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

Update w/upsert ignores dbref field from query on insert

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Fixed
    • Affects Version/s: 1.4.4, 1.5.5
    • Fix Version/s: 2.1.2
    • Component/s: Write Ops
    • Labels:
      None
    • Operating System:
      ALL

      Description

      > 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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: