Closed
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the issue has not already been raised
Issue
Here's the page.
I ran into this issue while trying to use pre
/post
middleware with Model.save()
.
According to the top of the doc, save
middleware is only supported for the Document
class.
However, the section Define Middleware Before Compiling Models shows that save
middleware is supported for Model
.
The code snippets in the section don't work for me, but save
should be a basic supported feature. For example, pre middleware to save
a user can encrypt a password.
Metadata
Metadata
Assignees
Labels
This issue is due to a mistake or omission in the mongoosejs.com documentationThis issue is due to a mistake or omission in the mongoosejs.com documentation