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

Mongoose Deprecation Warning #188

Closed
stanleyowen opened this issue May 29, 2021 · 0 comments
Closed

Mongoose Deprecation Warning #188

stanleyowen opened this issue May 29, 2021 · 0 comments
Assignees
Labels
bug Something isn't working dependencies fixed

Comments

@stanleyowen
Copy link
Owner

Describe the bug
As on the latest version of mongoose dependency, which is v5.x, there are some deprecations made on this dependency to improve the consistency across all MongoDB Driver etc. Therefore, there are some deprecations as described here:

mongoose.set('useNewUrlParser', true);
mongoose.set('useFindAndModify', false);
mongoose.set('useCreateIndex', true);
mongoose.set('useUnifiedTopology', true);
Replace update() with updateOne(), updateMany(), or replaceOne()
Replace remove() with deleteOne() or deleteMany().
Replace count() with countDocuments(), unless you want to count how many documents are in the whole collection (no filter). In the latter case, use estimatedDocumentCount().

Expected behavior
Replace all the deprecated with the alternative in order to avoid error.

Desktop (please complete the following information):

  • OS: Windows 10 OS Version 2009 (Build 19042.985)
  • Browser Chrome
  • Version 91.0.4472.77
@stanleyowen stanleyowen self-assigned this May 29, 2021
@stanleyowen stanleyowen added bug Something isn't working dependencies labels May 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies fixed
Projects
None yet
Development

No branches or pull requests

1 participant