在 shell 中,我的查询是:
db.checkin_4e95ae0926abe9ad28000001.update({location_city:"New York"}, {location_country: "FUDGE!"});
但是,它实际上并没有更新我的记录。它也不会出错。当我db.checkin_4e95ae0926abe9ad28000001.find({location_city:"New York"});
在运行此之后执行时,我得到了所有结果,但location_country
没有改变:
{
"_id": ObjectId("4e970209a0290b70660009e9"),
"addedOn": ISODate("2011-10-13T15:21:45.772Z"),
"location_address1": "",
"location_city": "New York",
"location_country": "United States",
"location_latLong": {
"xLon": -74.007124,
"yLat": 40.71455
},
"location_source": "socialprofile",
"location_state": "New York",
"location_zip": ""
}