pre() and post() options to switch between query middleware and document middleware · Issue #3054 · Automattic/mongoose

Some hooks, like 'update' and 'remove', can be triggered by Document.update() as well as Query.update(). Re: #1241 (comment), it would be good to be able to do the following: schema.pre('remove', {...