Answers for "collection.update is deprecated"


// Make Mongoose use `findOneAndUpdate()`. Note that this option is `true`
// by default, you need to set it to false.
mongoose.set('useFindAndModify', false);
Posted by: Guest on June-24-2020

deprecationwarning: mongoose

mongoose.connect("mongodb://localhost/test1", { useNewUrlParser: true, useUnifiedTopology: true });
//test1 is databse name
Posted by: Guest on June-20-2020

Code answers related to "collection.update is deprecated"

Browse Popular Code Answers by Language