1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-10-20 19:52:09 +00:00

add relation between user and tags, tests are broken

This commit is contained in:
Nicolas Lœuillet 2015-02-26 09:41:42 +01:00
parent a36737f485
commit 092ca70725
7 changed files with 131 additions and 31 deletions

View file

@ -124,11 +124,14 @@ class EntryRepository extends EntityRepository
*
* @return Entry
*/
public function findOneWithTags()
public function findOneWithTags($userId)
{
$qb = $this->createQueryBuilder('e')
->innerJoin('e.tags', 't')
->addSelect('t');
->addSelect('t')
->where('t.user=:userId')->setParameter('userId', 1);
return $qb->getQuery()->getOneOrNullResult();
return $qb
->getQuery()