Details
-
Bug
-
Resolution: Done
-
Major - P3
-
2.1.0
-
None
-
64-bit Windows 7
-
Fully Compatible
-
ALL
Description
Attempting to perform an update operation using the positional operator and an indexed query fails.
I have verified that this same example worked under 2.0.0.
Example: [Starting with an empty database]
MongoDB shell version: 2.1.0
...
> db.test.save( { ArrayField : [
] } )
> db.test.update(
, { $inc :
{ "ArrayField.$.Count" : 1 } } )
> db.test.find()
{ "_id" : ObjectId("4f47b2bb78da8386a67102c7"), "ArrayField" : [
] }
> db.test.ensureIndex(
)
> db.test.update(
, { $inc :
{ "ArrayField.$.Count" : 1 } } )
can't append to array using string field name [$]