javascript - MongoDB - Updated $ref value unable to query new value -


I've posted the following question that has been answered correctly:

Despite this, when I execute such a method:

{"codeId": {"$ ref": "code", "$ id": {"$ oid" : "4ff1c08c6ef25616ce21c4b6"}}}

The document has not returned ... Why any thoughts?

The document is stored in this way:

{"$ Oid": {"$ oid": "5097ae1cd3159eb52d05574c"}, "codeId": {"$ ref": " By using the UMango GUI, if I select the update option on this archived document, "code", "$ id": {"$ oid": "4ff1c08c6ef25616ce21c4b6"}}}

Thank you

This d One of the BRF "tweak" things is clearly one ...

Bably correct as a temporary (but pro)) Ok, I execute this Javascript process to solve this problem Managed to:

  var cursor = db.menu.find ({"codeId. Ref:" "version"}); While (cursor.hasNext ()) {var document = cursor.next (); Db.menu.update (document, {$ set: {"codeId": dbrf ("code", document.codeId. $ Id)}}, {upset: false, multiple: true}); }  

However, I will not consider it the best way to achieve ... Any other solution includes fewer rows?


Comments