group by - count on identity

This commit is contained in:
Jan Prochazka
2020-06-21 10:41:26 +02:00
parent 0e1e3b9ed7
commit e1eb8ffd56

View File

@@ -282,7 +282,10 @@ export abstract class GridDisplay {
getGrouping(uniqueName): GroupFunc {
if (this.isGrouped) {
return this.config.grouping[uniqueName] || 'MAX';
if (this.config.grouping[uniqueName]) return this.config.grouping[uniqueName];
const column = this.baseTable.columns.find((x) => x.columnName == uniqueName);
if (column?.autoIncrement) return 'COUNT';
return 'MAX';
}
return null;
}