diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobAggregator.php index 5019d3a8b..1278bc21c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobAggregator.php @@ -40,11 +40,11 @@ final class JobAggregator implements AggregatorInterface public function alterQuery(QueryBuilder $qb, $data) { - if (!in_array('acpjob', $qb->getAllAliases(), true)) { - $qb->leftJoin('acp.job', 'acpjob'); + if (!in_array('acpuser', $qb->getAllAliases(), true)) { + $qb->leftJoin('acp.user', 'acpuser'); } - $qb->addSelect('IDENTITY(acp.job) AS job_aggregator'); + $qb->addSelect('IDENTITY(acpuser.userJob) AS job_aggregator'); $qb->addGroupBy('job_aggregator'); }