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)
{
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')
;
}