exports: add condition with distinct alias on join clauses (wip)

This commit is contained in:
2022-09-07 19:35:07 +02:00
parent 3851e65777
commit 81359877c4
21 changed files with 129 additions and 59 deletions

View File

@@ -44,8 +44,8 @@ class ActivityTypeAggregator implements AggregatorInterface
public function alterQuery(QueryBuilder $qb, $data)
{
if (!in_array('type', $qb->getAllAliases(), true)) {
$qb->join('activity.activityType', 'type');
if (!in_array('aty', $qb->getAllAliases(), true)) {
$qb->join('activity.activityType', 'aty');
}
$qb->addSelect(sprintf('IDENTITY(activity.activityType) AS %s', self::KEY));