📌  相关文章
📜  通过 id 集更新具有不同字段值的多个文档. Mongoose - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:19.186000             🧑  作者: Mango

代码示例1
You can not update two documents at once with a MongoDB query. You will always have to do that in two queries. You can of course set a value of a field to the same value, or increment with the same number, but you can not do two distinct updates in MongoDB with the same query.