Closed
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Mongoose version
8.4.3
Node.js version
20.14
MongoDB server version
7.0
Typescript version (if applicable)
No response
Description
Query.prototype.count()
and findOneAndRemove()
are still alive.
I found that the issue was that the query was using mquery as it is. - permlink
mquery@5 has count() and findOneAndRemove().
Therefore, mongoose@8 removed count()
and findOneAndRemove()
, but the methods from mquery are being called.
Steps to Reproduce
await User.updateOne().findOne().findOneAndRemove();
await User.findOne().count();
I don't think this is good code, but it still works.
Expected Behavior
No response
Metadata
Metadata
Assignees
Labels
No labels