[person][export] Fixed: use left join for related entities in accompanying course aggregators

This commit is contained in:
2022-09-21 17:28:36 +02:00
parent ca6fde934b
commit cf9b9b3c75
24 changed files with 113 additions and 206 deletions

View File

@@ -39,15 +39,8 @@ class EvaluationTypeAggregator implements AggregatorInterface
public function alterQuery(QueryBuilder $qb, $data)
{
$qb->addSelect('IDENTITY(workeval.evaluation) AS evaluationtype_aggregator');
$groupBy = $qb->getDQLPart('groupBy');
if (!empty($groupBy)) {
$qb->addGroupBy('evaluationtype_aggregator');
} else {
$qb->groupBy('evaluationtype_aggregator');
}
$qb->addSelect('IDENTITY(workeval.evaluation) AS eval_evaluationtype_aggregator');
$qb->addGroupBy('eval_evaluationtype_aggregator');
}
public function applyOn(): string
@@ -67,6 +60,10 @@ class EvaluationTypeAggregator implements AggregatorInterface
return 'Evaluation type';
}
if (null === $value) {
return '';
}
$ev = $this->evaluationRepository->find($value);
return $this->translatableStringHelper->localize($ev->getTitle());
@@ -75,7 +72,7 @@ class EvaluationTypeAggregator implements AggregatorInterface
public function getQueryKeys($data): array
{
return ['evaluationtype_aggregator'];
return ['eval_evaluationtype_aggregator'];
}
public function getTitle(): string