-
Type: Bug
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: 3.6.0
-
Component/s: None
-
None
-
ALL
v3.6 $setOnInsert may create objects with dots in field names
v3.4 used to fail in this case because dots are not allowed in field names.
I did not find anything related in release notes, so it looks like a potential regression.
The following command adds a document which sub-document has a field "bad.1"
{{> db.test.update({y : {y :
{"bad.1" : 1}} }, {$setOnInsert :
{x : 42}},
{upsert : true})
WriteResult(
)
> db.test.find()
{ "_id" : ObjectId("5a2d066a88785e4c179faaa1"), "y" : { "y" :
}, "x" : 42 }
}}
- duplicates
-
SERVER-29594 "update" can produce documents with dotted field names
- Closed