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

Update w/upsert ignores dbref field from query on insert

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 2.1.2
    • Affects Version/s: 1.4.4, 1.5.5
    • Component/s: Write Ops
    • Labels:
      None
    • ALL

      > db.test.remove()
      > db.test.update({ "name" : "first" , "pic" : { "$ref" : "Pic", "$id" : ObjectId("4c48d04cd33a5a92628c9af6") }}, {$set:{}}, true, true)
      > db.test.find()

      { "_id" : ObjectId("4c48d2c9280e000000004377"), "name" : "first" }

      The pic field is not saved; The actual update is more complicated but this is reduced to the minimum.

      This was originally a problem from the 2.0 java driver but I doubt that has any bearing on the server.

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            6 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: