Exepected result: modify the document
Actual result: error.
> db.foo.find()
{ "_id" : ObjectId("5010009b54f3e488821117fc"), "j" : 0, "s" : "abc", "e" : [ { "t" : "a", "c" : 100 } ] }
> db.runCommand( { findAndModify: "foo", query : { s : "abc", j : 0 , 'e.t' : "a" }, update : { $set : { 'e.$.c' : 3 } } });
{
"value" : {
"_id" : ObjectId("5010009b54f3e488821117fc"),
"j" : 0,
"s" : "abc",
"e" : [
{
"t" : "a",
"c" : 100
}
]
},
"errmsg" : "exception: can't append to array using string field name [$]",
"code" : 13048,
"ok" : 0
}
- related to
-
SERVER-6993 findAndModify positional operator regression with undotted query fields
-
- Closed
-