Browse Source

Update the query to use DISTINCT

Thomas Rabaix 13 năm trước cách đây
mục cha
commit
8a7682b1ff
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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);