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

Update w/upsert ignores dbref field from query on insert

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical - P2
    • Resolution: Fixed
    • 1.4.4, 1.5.5
    • 2.1.2
    • Write Ops
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: