> db.t3.insert({_id:1,list:[
{name:"a",val:1}]})
> db.t3.find()
{ "_id" : 1, "list" : [
] }
> db.t3.update(
,{ $set:
{ "list.$.val" : 2 } },false,true)
can't append to array using string field name
> db.t3.update(
{ "list.name" : "a" },{ $set:
{ "list.$.val" : 2 } },false,true)
> db.t3.find()
{ "_id" : 1, "list" : [
] }
>
- is related to
-
SERVER-9028 Using positional operator with db.collection.find() to fetch multiple embedded documents does not work as expected
- Closed
- related to
-
SERVER-14280 Additional tests for updates with regex query and positional operator
- Closed