From ff3b63f2a9a0aae3a123d024fe6a2834772ea68c Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 28 Mar 2013 18:16:50 +0100 Subject: [PATCH] FIX Remove unnecessary DISTINCT from ManyManyList->removeAll() Breaks Postgres if the innermost query has an ORDER BY statement as well --- model/ManyManyList.php | 1 + 1 file changed, 1 insertion(+) diff --git a/model/ManyManyList.php b/model/ManyManyList.php index 52aa3d275..defb15fa9 100644 --- a/model/ManyManyList.php +++ b/model/ManyManyList.php @@ -180,6 +180,7 @@ class ManyManyList extends RelationList { $from = $query->getFrom(); unset($from[$this->joinTable]); $query->setFrom($from); + $query->setDistinct(false); // Use a sub-query as SQLite does not support setting delete targets in // joined queries.