Open
Description
mongoose : 4.12.4
nodeJs : 8.2.1
mongoDB : 3.4.6
Hello,
Here's an enhancement purpose : currently, virtuals are not called when I use update queries like findByIdAndUpdate. You recently added a great feature : runSettersOnQuery but virtuals still not called. This because object contains update is casted before applySetters called, and fields that does not match model are removed...
I use virtual to make encryption/decryption on few fields, and it's not possible to use this very useful feature with update queries. It's possible to use save instead, but not always, especially when you have an object which contains new values...
Best regards