From 056e564217a08565330a74faa79c9221535659bc Mon Sep 17 00:00:00 2001 From: Stig Lindqvist Date: Fri, 27 Jan 2012 18:27:24 +1300 Subject: [PATCH] BUGFIX Subtract should not add order by on subselect --- model/DataQuery.php | 1 - 1 file changed, 1 deletion(-) diff --git a/model/DataQuery.php b/model/DataQuery.php index cea43dd26..25a44f4ab 100644 --- a/model/DataQuery.php +++ b/model/DataQuery.php @@ -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().')'); }