diff --git a/lib/model.js b/lib/model.js index abde13819f6..9abbeeb14f0 100644 --- a/lib/model.js +++ b/lib/model.js @@ -2558,6 +2558,7 @@ Model.$where = function $where() { * Model.findOneAndUpdate(query, { $set: { name: 'jason bourne' }}, options, callback) * * This helps prevent accidentally overwriting your document with `{ name: 'jason bourne' }`. + * To prevent this behaviour, see the `overwrite` option * * #### Note: * @@ -2690,6 +2691,7 @@ function _decorateUpdateWithVersionKey(update, options, versionKey) { * Model.findByIdAndUpdate(id, { $set: { name: 'jason bourne' }}, options, callback) * * This helps prevent accidentally overwriting your document with `{ name: 'jason bourne' }`. + * To prevent this behaviour, see the `overwrite` option * * #### Note: *