mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
2bc273e2a8
commit
6d5925708e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user