BUGFIX: Ensure that subtracting a sorted DataList works.

This commit is contained in:
Sam Minnee 2012-08-23 12:35:20 +12:00
parent 296ee1fa0f
commit ed0341e82f

View File

@ -656,6 +656,7 @@ function max($field) {
$fieldExpression = $this->expressionForField($field, $subSelect);
$subSelect->setSelect(array());
$subSelect->selectField($fieldExpression, $field);
$subSelect->setOrderBy(null);
$this->where($this->expressionForField($field, $this).' NOT IN ('.$subSelect->sql().')');
return $this;