Replies: 1 comment 1 reply
-
Thanks for your kind words, we're flattered :)
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Howdies!
I never knew working with a database could be so fun! Mongoose is such a breath of fresh air.
Anyway, I was reading through the documentation and the concept of middleware has sparked my interest. Even though I haven't actually tried them yet I can see their use. Two questions remain:
Does it simply imply that the set of middleware is immutable once the schema they're defined in is compiled the very first time? Meaning I won't be able to add new hooks or drop the existing ones should I decide to later on?
tags
key:but I'd also like to able to store them in their own collection. So a post-save hook seems like a perfect fit here. What would be a good way of achieving that? Export the
Tag
model inItem
and do something likeTag.create()
in the post-save hook?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions