Skip to content

Commit

Permalink
fix(query): remove count() and findOneAndRemove() from query chai…
Browse files Browse the repository at this point in the history
…ning

Fix #14689
  • Loading branch information
vkarpov15 committed Jun 25, 2024
1 parent f89868b commit 6136846
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ function Query(conditions, options, model, collection) {

Query.prototype = new mquery();
Query.prototype.constructor = Query;

// Remove some legacy methods that we removed in Mongoose 8, but
// are still in mquery 5.
Query.prototype.count = undefined;
Query.prototype.findOneAndRemove = undefined;

Query.base = mquery.prototype;

/*!
Expand Down

0 comments on commit 6136846

Please sign in to comment.