Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. To fix all deprecation warnings, follow the below steps:
  2.  
  3. mongoose.set('useNewUrlParser', true);
  4. mongoose.set('useFindAndModify', false);
  5. mongoose.set('useCreateIndex', true);
  6. Replace update() with updateOne(), updateMany(), or replaceOne()
  7. Replace remove() with deleteOne() or deleteMany().
  8. 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().
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement