Skip to content
This repository was archived by the owner on Apr 16, 2022. It is now read-only.

Grouping UnionModel with GroupModel is not working. #9

Open
romaninsh opened this issue Apr 18, 2017 · 0 comments
Open

Grouping UnionModel with GroupModel is not working. #9

romaninsh opened this issue Apr 18, 2017 · 0 comments

Comments

@romaninsh
Copy link
Member

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'"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant