Parcourir la source

Update the query to use DISTINCT

Thomas Rabaix il y a 13 ans
Parent
commit
8a7682b1ff
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  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);