mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #171 from silverstripe-scienceninjas/pull/fix-default-sorting-bugs-subtract
BUGFIX Subtract should not add order by on subselect
This commit is contained in:
commit
3f682531e6
@ -514,7 +514,6 @@ class DataQuery {
|
||||
public function subtract(DataQuery $subtractQuery, $field='ID') {
|
||||
$subSelect= $subtractQuery->getFinalisedQuery();
|
||||
$subSelect->select($this->expressionForField($field, $subSelect));
|
||||
$this->ensureSelectContainsOrderbyColumns($subSelect);
|
||||
$this->where($this->expressionForField($field, $this).' NOT IN ('.$subSelect->sql().')');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user