diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php index 4686e64d9..1ba9d9f06 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php @@ -86,13 +86,7 @@ final class CountryOfBirthAggregator implements AggregatorInterface, ExportEleme $qb->leftJoin('person.countryOfBirth', 'countryOfBirth'); // add group by - $groupBy = $qb->getDQLPart('groupBy'); - - if (!empty($groupBy)) { - $qb->addGroupBy('country_of_birth_aggregator'); - } else { - $qb->groupBy('country_of_birth_aggregator'); - } + $qb->addGroupBy('country_of_birth_aggregator'); } public function applyOn() diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php index 73e0eedd6..2001466ab 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php @@ -70,14 +70,7 @@ final class HouseholdPositionAggregator implements AggregatorInterface, ExportEl $qb->setParameter('date', $data['date_position']); $qb->addSelect('IDENTITY(householdmember.position) AS household_position_aggregator'); - - $groupBy = $qb->getDQLPart('groupBy'); - - if (!empty($groupBy)) { - $qb->addGroupBy('household_position_aggregator'); - } else { - $qb->groupBy('household_position_aggregator'); - } + $qb->addGroupBy('household_position_aggregator'); } public function applyOn() diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php index 686f907ef..e20ecfb62 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php @@ -43,14 +43,7 @@ final class MaritalStatusAggregator implements AggregatorInterface } $qb->addSelect('personmarital.id as marital_status_aggregator'); - - $groupBy = $qb->getDQLPart('groupBy'); - - if (!empty($groupBy)) { - $qb->addGroupBy('marital_status_aggregator'); - } else { - $qb->groupBy('marital_status_aggregator'); - } + $qb->addGroupBy('marital_status_aggregator'); } public function applyOn() diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php index cbaa7a7ed..1eced58d3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php @@ -83,15 +83,7 @@ final class NationalityAggregator implements AggregatorInterface, ExportElementV } $qb->leftJoin('person.nationality', 'nationality'); - - // add group by - $groupBy = $qb->getDQLPart('groupBy'); - - if (!empty($groupBy)) { - $qb->addGroupBy('nationality_aggregator'); - } else { - $qb->groupBy('nationality_aggregator'); - } + $qb->addGroupBy('nationality_aggregator'); } public function applyOn()