Hi,
I'm using MongoDB 1.4.1 on Win 7 64bit with PHP.
When I try to update a value in an indexed list I get the error:
"can't append to array using string field name"
As soon as I remove the index, the update performs with no problems.
I have some test documents like this:
{"cast":["Samuel","John"],"movie":"Pulp Fiction"}
{"cast":["John","Hugh","Halle"],"movie":"Swordfish"}
"cast" has an ascending index.
My update routine in PHP looks like this:
$collection->update(
array('cast' => 'John'),
array('$set' => array('cast.$' => 'John Travolta')),
array('multiple' => TRUE)
);
I've tried the same on the console, same result: with index I get the error,
without the index the update works.
Any ideas on that one?
Thanks a lot,
Steffen
--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to
mongod...@googlegroups.com.
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/mongodb-user?hl=en.