From d9175a0e6e5df070989e0bc2450bf3a625949673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Ste=CC=A8pien=CC=81?= Date: Thu, 24 Aug 2023 23:17:00 +0200 Subject: [PATCH] ImageSliderRepository::getHighestPosition position returned fix --- src/Repository/ImageSliderRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Repository/ImageSliderRepository.php b/src/Repository/ImageSliderRepository.php index d8427f1..c9000dc 100644 --- a/src/Repository/ImageSliderRepository.php +++ b/src/Repository/ImageSliderRepository.php @@ -30,7 +30,7 @@ public function getHighestPosition(): int $qb = $this ->createQueryBuilder('s') ->select('s.position') - ->orderBy('s.position', 'ASC') + ->orderBy('s.position', 'DESC') ->setMaxResults(1) ->getQuery();