我想将集合中所有项目的字段从id
to重命名。other
当我在控制台中发出这个时,什么也没有发生。
db.my_collection.update({}, {$rename: {"id": "other"}}, {multi:true})
如果我随后发出
db.my_collection.find()
田野还是和以前一样。我究竟做错了什么?
我想将集合中所有项目的字段从id
to重命名。other
当我在控制台中发出这个时,什么也没有发生。
db.my_collection.update({}, {$rename: {"id": "other"}}, {multi:true})
如果我随后发出
db.my_collection.find()
田野还是和以前一样。我究竟做错了什么?