This is a hard to debug problem if your MongoDB driver/client wrappers are deep enough. I hope this helps you solve your problem.
e.g:
PHP Mongo
$data =array('$set'=> array('value' => 1), 'value2' => 2); $condition = array("id"=>123); $mongocollection->update($condition, $data);
Mongo Shell
db.testcollection.update({"_id":ObjectId("4e5c4aa37f8b9acf1000005d"),"type":"mytpe"},{"$set":{"counters":{"views":2}},"test":),"type":"yourtype"});
No comments:
Post a Comment