-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: 2.1.0
-
Component/s: Index Maintenance, Write Ops
-
None
-
Environment:64-bit Windows 7
-
Fully Compatible
-
ALL
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
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 [$]