Mongodb version 1.6
e.g.
> db.test1.find()
{ "_id" : 11, "name" : "wh" }
{ "_id" : 12, "name" : "ww" }
{ "_id" : 13, "name" : "wq" }
{ "_id" : 22 }
{ "_id" : 23 }
{ "_id" : 24 }
> db.test1.update({"name":{$exists:false}},{$set:{"name":"xxx"}},false,true)
> db.test1.find()
{ "_id" : 11, "name" : "wh" }
{ "_id" : 12, "name" : "ww" }
{ "_id" : 13, "name" : "wq" }
{ "_id" : 22, "name" : "xxx" }
{ "_id" : 23, "name" : "xxx" }
{ "_id" : 24, "name" : "xxx" }
-----邮件原件-----
发件人: mongod...@googlegroups.com [mailto:mongod...@googlegroups.com]
代表 David Judd
发送时间: 2010年8月18日 4:44
收件人: mongodb-user
主题: [mongodb-user] updates question
Thanks!
-David
--
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com.
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/mongodb-user?hl=en.
2010/8/18 David Judd <david....@gmail.com>: