Recently I asked for $in when using mongoose.someModel.find({$in}) https://stackoverflow.com/questions/11839765/whats-wrong-with-in-in-mongoose"
After restarting node for a few times it work correctly as it was originally. But now I found next
dbQueries.update({_id: {$in: req.body.data}, authorId: req.user._id}, {deleted: true}, function onUpdate(err){
if(err) {
console.log(err);
res.json({epicFail: 'ERR_RestrictedAccess'});
return;
}
res.json({});
});
I found that it updates only first found document! What is happening? I use the last node version and the last of mongoose 2. Moreover it works correctly with mongo-native!!!