如何用另一个mongo嵌套字段更新mongo嵌套字段?

时间:2020-06-14 06:14:29

标签: javascript mongodb nosql

我正在尝试使用其他嵌套字段更新嵌套:

db.projects.update({
  "projectSteps.uploadToCreate.status": 1
}, //no started   {   $set: {    
"projectSteps.ownerReviewandApproval._id": ObjectId(),
"projectSteps.ownerReviewandApproval.documents": projectSteps.differentStepField.documents, < -help "projectSteps.ownerReviewandApproval.name": 'ownerReviewandApproval',
"projectSteps.ownerReviewandApproval.status": NumberInt(1),
//}
}, {
multi: true
});

谢谢,

0 个答案:

没有答案