Inheritance via discriminator, hooks are not inherited, contrary to the documentation #5147
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Mongoose 4.9.3
I use schema inheritance, as described here. Samle code:
eventSchema
andclickedEventSchema
each have theirfindOneAndUpdate
hook.Upon
findOneAndUpdate
, only theclickedEventSchema
's hook is executed:This is contrary to what the documentation states:
Bug? Outdated documentation? Misunderstanding?
The text was updated successfully, but these errors were encountered: