Closed IonicaBizau closed 11 years ago
And do you send {multi: true}
in the crud options?
Has this parameter to be sent? Where in the o
field of crudObj
?
I've testet it with {mutli: true}
and it works.
See here for more info: http://docs.mongodb.org/manual/reference/method/db.collection.update/#multi-parameter
Yes, it works. o: {multi: true}
was missing from the crud object. Thanks!
I have three items in my MongoDB collection that have the following object ids:
524c3364d1e72e0e1500001d
,524c3365d1e72e0e1500001e
,524c3362d1e72e0e1500001c
.I want to set
{parent: "524c3362d1e72e0e1500001c"}
for the524c3364d1e72e0e1500001d
and524c3365d1e72e0e1500001e
.Only one document is updated.
The crud object is:
...and I make
self.emit("update", crudObject, function (err, data) {})
.No error is thrown, but I don't see the expected result.
In mongo shell if I do:
I get the correct result.