📜  更新操作文档必须包含原子操作符 mongodb - 任何代码示例

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

代码示例2
db.c20160712.updateOne(
    { "Attribute" : "good" }, 
    { $set: {"Type" : "DVD", "Title" : "Matrix, The", "Released" : 1999, "Genre" : "Action" } },
    { upsert: true }
);