Mongoose has 3 records to delete records
char.remove()
-
MarioChar.remove()
Inside the bracket we are going to pass the options -
MarioChar.findOneAndRemove()
Inside the bracket we're going to pass the options
Use of findOneAndRemove()
MarioChar.findOneAndRemove({ name:"Mario" }).then(function(){
MarioChar.findOne({ name:"Mario" })
})
Top comments (0)