You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of these are basically aliases for existing middleware types, but there need to be hooks for them in historical.
Since some of the middleware types now exist for both document and query (for example updateOne and remove), there are some naming conflicts.
To fully support all kinds of middleware types, there are options for which kind each is for: https://mongoosejs.com/docs/middleware.html#naming
The update and remove middleware types are deprecated, BUT they are still supported and very much in use, so they should still be included in historical. https://mongoosejs.com/docs/deprecations.html
The text was updated successfully, but these errors were encountered:
Mongoose has some new middleware types for both document and query:
https://mongoosejs.com/docs/middleware.html
New document middleware types:
deleteOne
updateOne
remove
New query middleware types:
deleteMany
deleteOne
findOneAndDelete
updateOne
updateMany
Most of these are basically aliases for existing middleware types, but there need to be hooks for them in historical.
Since some of the middleware types now exist for both document and query (for example
updateOne
andremove
), there are some naming conflicts.To fully support all kinds of middleware types, there are options for which kind each is for:
https://mongoosejs.com/docs/middleware.html#naming
The
update
andremove
middleware types are deprecated, BUT they are still supported and very much in use, so they should still be included in historical.https://mongoosejs.com/docs/deprecations.html
The text was updated successfully, but these errors were encountered: