diff --git a/docs/deprecations.md b/docs/deprecations.md index f8a3472bc54..b17953659c0 100644 --- a/docs/deprecations.md +++ b/docs/deprecations.md @@ -60,7 +60,7 @@ If you use [`Model.findOneAndUpdate()`](/docs/api.html#model_Model.findOneAndUpd by default you'll see one of the below deprecation warnings. ``` -DeprecationWarning: Mongoose: `findOneAndUpdate()` and `findOneAndDelete()` without the `useFindAndModify` option set to false are deprecated. See: https://mongoosejs.com/docs/deprecations.html#findandmodify +DeprecationWarning: Mongoose: `findOneAndUpdate()` and `findOneAndDelete()` without the `useFindAndModify` option set to false are deprecated. See: https://mongoosejs.com/docs/5.x/docs/deprecations.html#findandmodify DeprecationWarning: collection.findAndModify is deprecated. Use findOneAndUpdate, findOneAndReplace or findOneAndDelete instead. ``` diff --git a/lib/query.js b/lib/query.js index 4eb5b4a4cde..65817f65fc0 100644 --- a/lib/query.js +++ b/lib/query.js @@ -3777,7 +3777,7 @@ const _legacyFindAndModify = util.deprecate(function(filter, update, opts, cb) { collection.collection._findAndModify(filter, sort, update, opts, _cb); }, 'Mongoose: `findOneAndUpdate()` and `findOneAndDelete()` without the ' + '`useFindAndModify` option set to false are deprecated. See: ' + - 'https://mongoosejs.com/docs/deprecations.html#findandmodify'); + 'https://mongoosejs.com/docs/5.x/docs/deprecations.html#findandmodify'); /*! * Override mquery.prototype._mergeUpdate to handle mongoose objects in