From cb3a690294b52d5a3bfca5d824c63e7c3f5fb8fb Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Mon, 6 May 2024 18:50:10 +0200 Subject: [PATCH] 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 8aac9b73..75c5c49a 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( - 'DISTINCT s AS shortUrl', + '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