Преглед изворни кода

Update the query to use DISTINCT

Thomas Rabaix пре 13 година
родитељ
комит
8a7682b1ff
1 измењених фајлова са 2 додато и 0 уклоњено
  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);