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

Upsert with filters for a subdocument and a nested subdocument key result with an invalid BSON. (one document with two duplicate keys!)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 2.2.2, 2.4.3
    • Fix Version/s: None
    • Component/s: Write Ops
    • Labels:
      None
    • Environment:
      OS X
    • Operating System:
      ALL

      Description

      Have a look at the resulting document, the 'key' subdocument repeats twice!:

      test> db.test.update({'key':

      {'nested': 1}

      , 'key.nested': 2}, {$set: {a:3}},

      {upsert:true}

      )
      test> db.test.find()
      {
      "_id": ObjectId("518b90225fef1b6560f579c3"),
      "a": 3,
      "key":

      { "nested": 1 }

      ,
      "key":

      { "nested": 1 }

      }

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: