diff --git a/Classes/Domain/Repository/IndexRepository.php b/Classes/Domain/Repository/IndexRepository.php index 0c231a3c..128d596a 100644 --- a/Classes/Domain/Repository/IndexRepository.php +++ b/Classes/Domain/Repository/IndexRepository.php @@ -36,6 +36,7 @@ class IndexRepository extends AbstractRepository protected $defaultOrderings = [ 'start_date' => QueryInterface::ORDER_ASCENDING, 'start_time' => QueryInterface::ORDER_ASCENDING, + 'uid' => QueryInterface::ORDER_ASCENDING, ]; /** @@ -99,11 +100,13 @@ public function findAllForBackend( $query->setOrderings([ 'start_date' => QueryInterface::ORDER_ASCENDING, 'start_time' => QueryInterface::ORDER_ASCENDING, + 'uid' => QueryInterface::ORDER_ASCENDING, ]); } else { $query->setOrderings([ 'start_date' => QueryInterface::ORDER_DESCENDING, 'start_time' => QueryInterface::ORDER_DESCENDING, + 'uid' => QueryInterface::ORDER_DESCENDING, ]); } @@ -674,6 +677,7 @@ protected function getSorting(string $direction, string $field = ''): array 'endDate' => $direction, 'startDate' => $direction, 'startTime' => $direction, + 'uid' => $direction, ]; } if ('end' !== $field) { @@ -683,6 +687,7 @@ protected function getSorting(string $direction, string $field = ''): array return [ $field . 'Date' => $direction, $field . 'Time' => $direction, + 'uid' => $direction, ]; } } diff --git a/Classes/Domain/Repository/RawIndexRepository.php b/Classes/Domain/Repository/RawIndexRepository.php index 7d14c2ee..d66e330b 100644 --- a/Classes/Domain/Repository/RawIndexRepository.php +++ b/Classes/Domain/Repository/RawIndexRepository.php @@ -102,6 +102,7 @@ public function findEventsAfterStartDate( ) ->addOrderBy('start_date', 'ASC') ->addOrderBy('start_time', 'ASC') + ->addOrderBy('uid', 'ASC') ->setMaxResults($limit); $result = $queryBuilder->executeQuery()->fetchAllAssociative();