-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: 1.6.0
-
Component/s: Internal Client
-
None
-
Environment:Ubuntu 10.1,
-
ALL
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
Seems to be related to this issue:" findandmodify doesn't support positional ($) operator" => http://jira.mongodb.org/browse/SERVER-1095
When I attempt to execute a positional set operation, the following error is emitted on the console: (with same example as linked).
update EXAMPLE_ARRAY query:
{ _id: ObjectId('4c6a7075c42868719b80c2e1') }byid exception 13048 can't append to array using string field name [$] 0ms
It works fine when I use the console. My find-and-modify command is as follows:
BSONObjBuilder b;
b << "findandmodify" << collection_name.c_str() <<
"query" << Query(query) <<
"update" << update <<
"new" << see_modified;
bool result = dbcb->runCommand(string(MONGO_DBNAME),
b.obj(),
rtn);
The query phase works perfectly well.