Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-5282

duplicate key results

      Using the cxx driver I managed to create an object containing the following fields:

      { _id: ObjId(4f59f734a695f63cb649e03b), a: 1, a: 2, a: 3, a: 4 }

      In most drivers (PHP, PyMongo, Java, node.js) the result of retrieving the object is predictably:

      { _id: ObjId(4f59f734a695f63cb649e03b), a: 4 }

      However in the shell I get:

      > db.persons.find().forEach(printjson)
      {
      "_id" : ObjectId("4f59f734a695f63cb649e03b"),
      "a" : 1,
      "a" : 1,
      "a" : 1,
      "a" : 1
      }

      What I'm curious about is why the shell uses the first value of "a" instead of the last one.

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            kai5263499 Wes Widner
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: