]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #2699 from wallabag/remove-usertable-query
authorJeremy Benoist <j0k3r@users.noreply.github.com>
Tue, 13 Dec 2016 08:08:34 +0000 (09:08 +0100)
committerGitHub <noreply@github.com>
Tue, 13 Dec 2016 08:08:34 +0000 (09:08 +0100)
Removed user join in query builder

src/Wallabag/CoreBundle/Repository/EntryRepository.php

index 47e24d6b4796a572fac31fbb0de3636630441d3e..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')
         ;
     }