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