mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 11:03:50 +00:00
exports: add condition with distinct alias on join clauses
This commit is contained in:
@@ -36,7 +36,9 @@ final class LocationAggregator implements AggregatorInterface
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb->join('cal.location', 'l');
|
||||
if (!in_array('calloc', $qb->getAllAliases(), true)) {
|
||||
$qb->join('cal.location', 'calloc');
|
||||
}
|
||||
$qb->addSelect('IDENTITY(cal.location) as location_aggregator');
|
||||
|
||||
$groupBy = $qb->getDQLPart('groupBy');
|
||||
|
Reference in New Issue
Block a user