Mongoose - remove multiple documents in one function call

后端 未结 4 746
鱼传尺愫
鱼传尺愫 2021-01-03 17:55

In documentation there\'s deleteMany() method

Character.deleteMany({ name: /Stark/, age: { $gte: 18 } }, function (err) {});

I want to remo

4条回答
  •  無奈伤痛
    2021-01-03 18:28

    You can also use.

    Site.remove({ userUID: uid, id: { $in: [10, 2, 3, 5]}}, function(err, response) {});
    

提交回复
热议问题