-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
None
-
ALL
For Example:
1,Create document which include two arrays that array "b" contain "name" attribute like "a"
db.test.insert(
{
"a":[
,
{"name":"b","age":"99"}],
"b":[
,
{"level":"b","name":"b","age":"99"}]}
)
2,Update document which I want locate
{"name":"a","age":"99"}in "a" and
{"level":"b","name":"b","age":"99"} in "b"
db.test.update(
,
{"$set":{"a.$.age":"100","b.$.age":"100"}}
)
But the result is:
{"_id":ObjectId("53437c573de4c79e7ff69e91"),
"a":[
,
{"age":"100","name":"b"}],
"b":[
,
{"age":"100","level":"b","name" :"b"}]
}
Updated the "
" in "a" like above ...