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

update with positional operator does not validate existence of a positional match

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Write Ops
    • None
    • ALL

      As a result, a '$' field may be inserted when an expected array is absent.

      > c.save( {} );
      > c.update( {}, { $set:{ 'x.$.y':1 } } )
      > c.findOne()
      {
      	"_id" : ObjectId("4f6baa5bf1d7af9aaed0f840"),
      	"x" : {
      		"$" : {
      			"y" : 1
      		}
      	}
      }
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: