Skip to content

Commit

Permalink
Merge pull request #13031 from AxeOfMen/patch-1
Browse files Browse the repository at this point in the history
Update middleware.md
  • Loading branch information
AbdelrahmanHafez committed Feb 15, 2023
2 parents b3e461a + 77a19dc commit 8e5bbfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ of middleware: document middleware, model middleware, aggregate middleware, and

Document middleware is supported for the following document functions.
In Mongoose, a document is an instance of a `Model` class.
In document middleware functions, `this` refers to the document.
In document middleware functions, `this` refers to the document. To access the model, use `this.constructor`.

* [validate](api/document.html#document_Document-validate)
* [save](api/model.html#model_Model-save)
Expand Down

0 comments on commit 8e5bbfa

Please sign in to comment.