Details
-
Task
-
Resolution: Won't Do
-
Major - P3
-
None
-
None
Description
https://docs.mongodb.com/manual/reference/method/db.collection.update/#mongodb30-upsert-id
According to this document the upsert does not go through because
"This restriction ensures that the order of fields embedded in the _id document is well-defined and not bound to the order specified in the query"
But if I slighlty modify the query as below it inserts successfully
Why is this allowed?
db.collection.update( { "_id.name": "Robert Frost", "_id.uid": 0 }, |
{ "$set": { "categories": ["poet", "playwright"] } }, |
{ upsert: true } ) |