Revert "Remove unneeded DISTINCT from list short URLs query"

This commit is contained in:
Alejandro Celaya 2024-05-09 09:43:55 +02:00 committed by GitHub
parent 05ebfccc63
commit 8cd77391cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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