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

New $prefix field (parents) not validated during update

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 2.6.5, 2.8.0-rc0
    • 2.8.0-rc3
    • Write Ops
    • None
    • Minor Change
    • ALL
    • Hide

      monkey101:(git)mongo[master]/$ ./mongo
      MongoDB shell version: 2.7.8-pre-
      connecting to: test
      > db.version()
      2.7.8-pre-
      > db.scott.drop()
      true
      > db.scott.insert({x:1})
      WriteResult({ "nInserted" : 1 })
      > db.scott.update({x:1},{$rename: {x: "$foo.bar"}})
      WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })
      > db.scott.find()
      { "_id" : ObjectId("543c1bb68752a4771eb3d208"), "$foo" : { "bar" : 1 } }

      Show
      monkey101:(git)mongo[master]/$ ./mongo MongoDB shell version: 2.7.8-pre- connecting to: test > db.version() 2.7.8-pre- > db.scott.drop() true > db.scott.insert({x:1}) WriteResult({ "nInserted" : 1 }) > db.scott.update({x:1},{$rename: {x: "$foo.bar"}}) WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 }) > db.scott.find() { "_id" : ObjectId("543c1bb68752a4771eb3d208"), "$foo" : { "bar" : 1 } }

    Description

      {_id: 1} + {$set:{"$bad.good":1}}
      

      Attachments

        Issue Links

          Activity

            People

              scotthernandez Scott Hernandez
              dan@mongodb.com Daniel Pasette
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: