Open Hisham-TK opened 3 years ago
This is a little trickier than expected because there's no way to get insertMany()
options in post('insertMany')
hooks with Mongoose. That's something we need to work on: the context for insertMany()
hooks should be something that enables accessing the options.
As a workaround, we're adding a populate
option for insertMany()
to Mongoose. That will enable this plugin to access insertMany()
options, and we'll have a fix for this within the next couple of days :+1:
insertMany method at mongoose like create many this plugin has to inject it's middleware at insertMany pre-post to populate on createMany
https://mongoosejs.com/docs/api.html#model_Model.insertMany