atk4 / report

Reporting extension for Agile Data
https://agiletoolkit.org/
MIT License
3 stars 6 forks source link

Grouping UnionModel with GroupModel is not working. #9

Open romaninsh opened 7 years ago

romaninsh commented 7 years ago

Trying to avoid #8, using GroupModel to group UnionModel causes error. Code:

$m = new \smbo\GroupModel($m);
$m->groupBy(['contact_id'], [
    'c'=>'count(*)',
    'total_net'=>'sum([])',
});

But this leads to the following error:

error: "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'derivedTable.contact_id' in 'group statement'"