MongoDb db.Collection.update()删除了我的文档

Edd*_*ddy 1 mongodb robo3t

updatemongodb数据库上运行一个语句,它删除了我的文档!我做错了什么?

这是更新声明:

db.Question.update( {Name: "IsSomeCompany"}, {ButtonValues: [0, 1, 2] } )
Run Code Online (Sandbox Code Playgroud)

我正在使用Robomongo和回复,Updated 1 record(s) in 22ms但当我检查数据库时,记录消失了.我在这里错过了什么?

Ham*_*edz 8

我使用这种语法来更新多个文档.

db.getCollection('YourDocument').update(
   { "matchingField" : "matchingValue"}, 
   { "$set": { "field": "value" } }, 
   { "multi": true } 
)
Run Code Online (Sandbox Code Playgroud)

https://docs.mongodb.com/manual/tutorial/update-documents/