Do not allow creating inserted doc from update with dotted _id path sources

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Write Ops
    • None
    • Query
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      For the following update (which results in an insert) this should not be allowed because it produces a document without constant _id field ordering:

      db.a.update({"_id.a":1, "_id.b":2}, {$inc:{x:1}}, {upsert:true})
      db.a.find()
      {_id:{a:1, b:2}, x:1}
      db.a.remove({})
      db.a.update({"_id.b":1}, {$inc:{x:1}, $setOnInsert:{"_id.a":2}}, {upsert:true})
      db.a.find()
      {_id:{b:1,a:2}, x:1}
      

            Assignee:
            Backlog - Query Team (Inactive)
            Reporter:
            Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: