laravel-eloquent-join
laravel-eloquent-join copied to clipboard
Optional Group by
Currently, for any relation automatically apply group by for pk key
$this->groupBy($baseTable.'.'.$basePrimaryKey);
so counting not possible without hooks in this situation
maybe add some flags for grouping on joins?
currently exist condition for count($relations) > 1
but by default relations adding like that $relations.'.FAKE_FIELD' and count always more than 1