Skip to content

Commit

Permalink
docs(documents): add runValidators description to documents docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Dec 22, 2016
1 parent daa9f83 commit 655d34a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/documents.jade
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ block content
res.send(tank);
});
:markdown
The `findAndUpdate/Remove` static methods all make a change to at most one document, and return it with just one call to the database. There [are](./api.html#model_Model.findByIdAndRemove) [several](./api.html#model_Model.findOneAndUpdate) [variations](./api.html#model_Model.findOneAndRemove) on the [findAndModify](http://www.mongodb.org/display/DOCS/findAndModify+Command) theme. Read the [API](./api.html) docs for more detail. _Note that `findAndUpdate/Remove` do not execute any hooks or validation before making the change in the database. If you need hooks and validation, first query for the document and then save it._
The `findAndUpdate/Remove` static methods all make a change to at most one document, and return it with just one call to the database. There [are](./api.html#model_Model.findByIdAndRemove) [several](./api.html#model_Model.findOneAndUpdate) [variations](./api.html#model_Model.findOneAndRemove) on the [findAndModify](http://www.mongodb.org/display/DOCS/findAndModify+Command) theme. Read the [API](./api.html) docs for more detail.

_Note that `findAndUpdate/Remove` do *not* execute any hooks or validation before making the change in the database. You can use the [`runValidators` option](/docs/validation.html#update-validators) to access a limited subset of document validation. However, if you need hooks and full document validation, first query for the document and then `save()` it._

h3 Validating
:markdown
Expand Down

0 comments on commit 655d34a

Please sign in to comment.