Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0.0BETA2
-
Fix Version/s: 1.0.0BETA2
-
Component/s: None
-
Labels:None
Description
$options are not used for update queries
=> how can we do an update(
{'multiple' => true}) ?
diff -rup doctrine-mongodb-odm-a0667bb/lib/vendor/doctrine-mongodb/lib/Doctrine/MongoDB/Query/Query.php mongodb_odm/lib/vendor/doctrine-mongodb/lib/Doctrine/MongoDB/Query/Query.php
--- doctrine-mongodb-odm-a0667bb/lib/vendor/doctrine-mongodb/lib/Doctrine/MongoDB/Query/Query.php 2011-01-17 06:38:18.000000000 +0100
+++ mongodb_odm/lib/vendor/doctrine-mongodb/lib/Doctrine/MongoDB/Query/Query.php 2011-01-31 17:34:04.000000000 +0100
@@ -172,7 +172,7 @@ class Query implements IteratorAggregate
return $this->collection->insert($this->query['newObj']);
case self::TYPE_UPDATE:
- return $this->collection->update($this->query['query'], $this->query['newObj']);
+ return $this->collection->update($this->query['query'], $this->query['newObj'], $this->options);
case self::TYPE_REMOVE:
return $this->collection->remove($this->query['query'], $this->options);
Fixed here https://github.com/doctrine/mongodb/commit/9511df1cede93286e8ddaa5dd00c73236fee08bd