猫鼬-updateMany

时间:2020-03-02 11:52:44

标签: node.js mongodb mongoose

updateMany会同时处理条件中的两个属性还是将其与job字段一起使用?

let criteria = {
    job: job._id,
    user: {$in: applicantIds}
}

let updatableObject = {
    interviewInvitation: true
}

await UserJob.updateMany(criteria, {$set: updatableObject})

1 个答案:

答案 0 :(得分:0)

过滤条件用作AND。必须满足所有条件。