diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/EntryRepository.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index f2c73bbf..23d1e37e 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php | |||
@@ -52,14 +52,21 @@ class EntryRepository extends EntityRepository | |||
52 | */ | 52 | */ |
53 | public function getBuilderForSameDomainByUser($userId, $entryId) | 53 | public function getBuilderForSameDomainByUser($userId, $entryId) |
54 | { | 54 | { |
55 | dump($entryId);die; | 55 | $queryBuilder = $this->createQueryBuilder('e'); |
56 | |||
57 | $ | ||
58 | 56 | ||
59 | return $this | 57 | return $this |
60 | ->getSortedQueryBuilderByUser($userId) | 58 | ->getSortedQueryBuilderByUser($userId) |
61 | ->andWhere('e.isArchived = false') | 59 | ->andWhere('e.id <> :entryId')->setParameter('entryId', $entryId) |
62 | ; | 60 | ->andWhere( |
61 | $queryBuilder->expr()->in( | ||
62 | 'e.domainName', | ||
63 | $this | ||
64 | ->createQueryBuilder('e2') | ||
65 | ->select('e2.domainName') | ||
66 | ->where('e2.id = :entryId')->setParameter('entryId', $entryId) | ||
67 | ->getDQL() | ||
68 | ) | ||
69 | ); | ||
63 | } | 70 | } |
64 | 71 | ||
65 | /** | 72 | /** |