const User = require('./model.js) const result = await User.updateMany({_id:{$in:team}},{ $set: { current_level_status : 'incomplete' , user_helper_status : false,user_admin_status : false }},{$inc:{level_number:1}}); console.log(result)
i am using mongoose set operator and increment operator together
mongoose 'updateMany' is not working with this operators team field contains array of object ids
https://stackoverflow.com/questions/66969846/i-cannot-use-set-operator-and-inc-operator-together-only-one-is-working-in-my April 06, 2021 at 09:42PM
没有评论:
发表评论