mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 02:53:50 +00:00
DX: do not use complicated condtiion to add a group by
This commit is contained in:
@@ -40,14 +40,7 @@ final class LocationAggregator implements AggregatorInterface
|
||||
$qb->join('cal.location', 'calloc');
|
||||
}
|
||||
$qb->addSelect('IDENTITY(cal.location) as location_aggregator');
|
||||
|
||||
$groupBy = $qb->getDQLPart('groupBy');
|
||||
|
||||
if (!empty($groupBy)) {
|
||||
$qb->addGroupBy('location_aggregator');
|
||||
} else {
|
||||
$qb->groupBy('location_aggregator');
|
||||
}
|
||||
$qb->addGroupBy('location_aggregator');
|
||||
}
|
||||
|
||||
public function applyOn(): string
|
||||
|
Reference in New Issue
Block a user