Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoStore deprecated methods #17

Open
boosterAFK opened this issue Aug 6, 2019 · 1 comment
Open

MongoStore deprecated methods #17

boosterAFK opened this issue Aug 6, 2019 · 1 comment

Comments

@boosterAFK
Copy link

While running with the latest version of Mongoose, I get the following warnings:

(node:31651) DeprecationWarning: collection.remove is deprecated. Use deleteOne, deleteMany, or bulkWrite instead.
(node:31651) DeprecationWarning: collection.findAndModify is deprecated. Use findOneAndUpdate, findOneAndReplace or findOneAndDelete instead.
(node:31651) DeprecationWarning: Mongoose: `findOneAndUpdate()` and `findOneAndDelete()` without the `useFindAndModify` option set to false are deprecated. 

Moreover, is good to put into the examples the following options for the mongoose connection:

useCreateIndex: true

in order to avoid the deprecation warning:

DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.

Is there any intent to fix these warnings?

@julienwilmet
Copy link
Contributor

Feel free to make a PR, it's on our todo though so when we have free time we'll check this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants