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:
@@ -41,7 +41,9 @@ class CancelReasonAggregator implements AggregatorInterface
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
// TODO: still needs to take into account appointments without a cancel reason somehow
|
||||
$qb->join('cal.cancelReason', 'cr');
|
||||
if (!in_array('calcancel', $qb->getAllAliases(), true)) {
|
||||
$qb->join('cal.cancelReason', 'calcancel');
|
||||
}
|
||||
|
||||
$qb->addSelect('IDENTITY(cal.cancelReason) as cancel_reason_aggregator');
|
||||
|
||||
|
Reference in New Issue
Block a user