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