Skip to content

Commit

Permalink
FIX Remove unnecessary DISTINCT from ManyManyList->removeAll()
Browse files Browse the repository at this point in the history
Breaks Postgres if the innermost query has an ORDER BY statement as well
  • Loading branch information
chillu committed Apr 3, 2013
1 parent f44d5b3 commit ff3b63f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions model/ManyManyList.php
Expand Up @@ -180,6 +180,7 @@ public function removeAll() {
$from = $query->getFrom(); $from = $query->getFrom();
unset($from[$this->joinTable]); unset($from[$this->joinTable]);
$query->setFrom($from); $query->setFrom($from);
$query->setDistinct(false);


// Use a sub-query as SQLite does not support setting delete targets in // Use a sub-query as SQLite does not support setting delete targets in
// joined queries. // joined queries.
Expand Down

0 comments on commit ff3b63f

Please sign in to comment.