DX: fixed complicated comparison to add a group by

This commit is contained in:
2022-10-06 23:42:46 +02:00
parent 1b1aaaa862
commit 07d15f0a68
5 changed files with 5 additions and 32 deletions

View File

@@ -47,14 +47,7 @@ class CancelReasonAggregator implements AggregatorInterface
}
$qb->addSelect('IDENTITY(cal.cancelReason) as cancel_reason_aggregator');
$groupBy = $qb->getDQLPart('groupBy');
if (!empty($groupBy)) {
$qb->addGroupBy('cancel_reason_aggregator');
} else {
$qb->groupBy('cancel_reason_aggregator');
}
$qb->addGroupBy('cancel_reason_aggregator');
}
public function applyOn(): string