Skip to content

Commit

Permalink
Merge pull request #10020 from GuySartorelli/patch-4
Browse files Browse the repository at this point in the history
FIX Remove limits in removeAll method
  • Loading branch information
michalkleiner authored Jan 14, 2022
2 parents 30325f6 + 5699db3 commit dee0b1f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ORM/ManyManyList.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ public function removeAll()
unset($from[$this->joinTable]);
$selectQuery->setFrom($from);
$selectQuery->setOrderBy(); // ORDER BY in subselects breaks MS SQL Server and is not necessary here
$selectQuery->setLimit(null); // LIMIT in subselects breaks MariaDB (https://mariadb.com/kb/en/subquery-limitations/#limit) and is not necessary here
$selectQuery->setDistinct(false);

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

0 comments on commit dee0b1f

Please sign in to comment.