FIX Empty fields on SQLQuery->aggregate() with alias

Breaks Postgres otherwise, because it produces a
"SELECT *, <field> ... " statement without putting all
fields into the GROUP BY.
This commit is contained in:
Ingo Schommer 2013-04-03 12:22:12 +02:00
parent 2bc273e2a8
commit 6d5925708e

View File

@ -1071,6 +1071,7 @@ class SQLQuery {
$clone->setOrderBy($this->orderby);
$clone->setGroupBy($this->groupby);
if($alias) {
$clone->setSelect(array());
$clone->selectField($column, $alias);
} else {
$clone->setSelect($column);