insert command does not move _id field to the front of BSON obj

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.5.5
    • Affects Version/s: 2.5.3
    • Component/s: None
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      > db.user.insert({ x: 1, _id: 2 })
      > db.user.find()
      { "_id" : 2, "x" : 1 }
      > db.user.drop()
      true
      > db.runCommand({ insert: 'user', documents: [{ x: 1, _id: 2 }]})
      { "ok" : 1, "n" : 1 }
      > db.user.find()
      { "x" : 1, "_id" : 2 }
      

      Not sure if moving _id field to the front is the desired behavior, but eval8.js fails if we switch to using write commands because of this.

              Assignee:
              Eliot Horowitz (Inactive)
              Reporter:
              Randolph Tan
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: