]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Repository/EntryRepository.php
Removed user join in query builder
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Repository / EntryRepository.php
index 51cfe4d195447be7e87b696ee3b394dba78ca824..553ad6abadd7f0c91f687ad4edebe7d5a7fbd0db 100644 (file)
@@ -20,8 +20,7 @@ class EntryRepository extends EntityRepository
     private function getBuilderByUser($userId)
     {
         return $this->createQueryBuilder('e')
-            ->leftJoin('e.user', 'u')
-            ->andWhere('u.id = :userId')->setParameter('userId', $userId)
+            ->andWhere('e.user = :userId')->setParameter('userId', $userId)
             ->orderBy('e.createdAt', 'desc')
         ;
     }
@@ -110,8 +109,7 @@ class EntryRepository extends EntityRepository
         $qb
             ->andWhere('e.content LIKE :term OR e.title LIKE :term')->setParameter('term', '%'.$term.'%')
             ->leftJoin('e.tags', 't')
-            ->groupBy('e.id')
-            ->having('count(t.id) = 0');
+            ->groupBy('e.id');
 
         return $qb;
     }