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

modifier operations should support numerical index field names

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.3.4
    • Affects Version/s: 1.3.2
    • Component/s: None
    • None

      > db.test.save( { _id : 1 , a : [

      { x : 1 , y : 2 }

      ,

      { x : 10 , y : 11 }

      ] })
      > db.test.find()
      { "_id" : 1, "a" : [

      { "x" : 1, "y" : 2 }

      ,

      { "x" : 10, "y" : 11 }

      ] }
      > db.test.update( {}, { $unset:

      {"a.0":1}

      } )
      > db.test.find()

      { "_id" : 1, "a" : [ null ] }

      Expected { "_id" : 1, "a" : [

      { "x" : 10, "y" : 11 }

      ] }

      $unset on the 1st idx (2nd element) works fine though.

            Assignee:
            aaron Aaron Staple
            Reporter:
            goosmurf Yun Huang Yong
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: