Merge pull request #2699 from wallabag/remove-usertable-query

Removed user join in query builder
This commit is contained in:
Jeremy Benoist 2016-12-13 09:08:34 +01:00 committed by GitHub
commit 15cc183850

View file

@ -20,8 +20,7 @@ class EntryRepository extends EntityRepository
private function getBuilderByUser($userId) private function getBuilderByUser($userId)
{ {
return $this->createQueryBuilder('e') return $this->createQueryBuilder('e')
->leftJoin('e.user', 'u') ->andWhere('e.user = :userId')->setParameter('userId', $userId)
->andWhere('u.id = :userId')->setParameter('userId', $userId)
->orderBy('e.createdAt', 'desc') ->orderBy('e.createdAt', 'desc')
; ;
} }