diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-05-29 14:18:04 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-05-29 15:56:20 +0200 |
commit | f3bfb875e94021a93e24a41fbc0f8d86d4dee378 (patch) | |
tree | 34f7efd0f3dc5326f68364e2fb2544619518c371 /src/Wallabag/CoreBundle/Repository | |
parent | b7fa51ae7dd5fef2d9459100c88479413ddd3fb3 (diff) | |
download | wallabag-f3bfb875e94021a93e24a41fbc0f8d86d4dee378.tar.gz wallabag-f3bfb875e94021a93e24a41fbc0f8d86d4dee378.tar.zst wallabag-f3bfb875e94021a93e24a41fbc0f8d86d4dee378.zip |
Use hash given url to avoid duplicate
Using hashed url we can ensure an index on them to ensure it's fast.
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository')
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/EntryRepository.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index 299b0b27..8b29aad2 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php | |||
@@ -368,7 +368,7 @@ class EntryRepository extends EntityRepository | |||
368 | { | 368 | { |
369 | $res = $this->createQueryBuilder('e') | 369 | $res = $this->createQueryBuilder('e') |
370 | ->where('e.hashedUrl = :hashed_url')->setParameter('hashed_url', $hashedUrl) | 370 | ->where('e.hashedUrl = :hashed_url')->setParameter('hashed_url', $hashedUrl) |
371 | // ->orWhere('e.givenUrl = :url')->setParameter('url', $url) | 371 | ->orWhere('e.hashedGivenUrl = :hashed_given_url')->setParameter('hashed_given_url', $hashedUrl) |
372 | ->andWhere('e.user = :user_id')->setParameter('user_id', $userId) | 372 | ->andWhere('e.user = :user_id')->setParameter('user_id', $userId) |
373 | ->getQuery() | 373 | ->getQuery() |
374 | ->getResult(); | 374 | ->getResult(); |