Skip to content

Commit

Permalink
Remove orderBy clauses in aggregate function (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-studer authored Mar 18, 2024
1 parent ebb54eb commit 5f33df8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Repository/DataEntryRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public function findYearsTo(Location $location, Topic $topic): array
public function findByLocationTopicYearTotal(?Location $location = null, ?Topic $topic = null, ?int $yearFrom = null, ?int $yearTo = null): int
{
return $this->createLocationTopicYearQuery($location, $topic, $yearFrom, $yearTo)
->resetDQLPart('orderBy')
->select('COUNT(d.id) AS total')
->getQuery()
->getOneOrNullResult()['total'];
Expand Down

0 comments on commit 5f33df8

Please sign in to comment.