[SERVER-5371] update with positional operator does not validate existence of a positional match Created: 22/Mar/12  Updated: 06/Mar/14  Resolved: 16/Aug/12

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Aaron Staple Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-6669 update lacking positional match creat... Closed
Operating System: ALL
Participants:

 Description   

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
		}
	}
}


Generated at Thu Feb 08 03:08:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.