From 8cd77391ccf34add41fce2883bd3c49da06752e3 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Thu, 9 May 2024 09:43:55 +0200 Subject: [PATCH] Revert "Remove unneeded DISTINCT from list short URLs query" --- module/Core/src/ShortUrl/Repository/ShortUrlListRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/Core/src/ShortUrl/Repository/ShortUrlListRepository.php b/module/Core/src/ShortUrl/Repository/ShortUrlListRepository.php index 75c5c49a..8aac9b73 100644 --- a/module/Core/src/ShortUrl/Repository/ShortUrlListRepository.php +++ b/module/Core/src/ShortUrl/Repository/ShortUrlListRepository.php @@ -42,7 +42,7 @@ class ShortUrlListRepository extends EntitySpecificationRepository implements Sh $qb = $this->createListQueryBuilder($filtering); $qb->select( - 's AS shortUrl', + 'DISTINCT s AS shortUrl', '(' . $buildVisitsSubQuery('v', excludingBots: false) . ') AS ' . OrderableField::VISITS->value, '(' . $buildVisitsSubQuery('v2', excludingBots: true) . ') AS ' . OrderableField::NON_BOT_VISITS->value, // This is added only to have a consistent order by title between database engines