Skip to content

Commit

Permalink
docs(migrating_to_8): add note about removing findByIdAndRemove
Browse files Browse the repository at this point in the history
Fix #15024
  • Loading branch information
vkarpov15 committed Nov 14, 2024
1 parent 445a76d commit f450083
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/migrating_to_8.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ In Mongoose 7, `findOneAndRemove()` was an alias for `findOneAndDelete()` that M
Mongoose 8 no longer supports `findOneAndRemove()`.
Use `findOneAndDelete()` instead.

Similarly, Mongoose 8 no longer supports `findByIdAndRemove()`, which was an alias for `findByIdAndDelete()`.
Please use `findByIdAndDelete()` instead.

## Removed `count()` {#removed-count}

`Model.count()` and `Query.prototype.count()` were removed in Mongoose 8. Use `Model.countDocuments()` and `Query.prototype.countDocuments()` instead.
Expand Down

0 comments on commit f450083

Please sign in to comment.