瀏覽代碼

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);