Browse Source

Update the query to use DISTINCT

Thomas Rabaix 13 years ago
parent
commit
8a7682b1ff
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Model/ModelManager.php

+ 2 - 0
Model/ModelManager.php

@@ -309,6 +309,8 @@ class ModelManager implements ModelManagerInterface
      */
     public function batchDelete($class, ProxyQueryInterface $queryProxy)
     {
+        $queryProxy->select('DISTINCT '.$queryProxy->getRootAlias());
+
         try {
             $entityManager = $this->getEntityManager($class);