]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Repository/EntryRepository.php
add relation between user and tags, tests are broken
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Repository / EntryRepository.php
index 10fb9bf7933ca1f986bcce8712d640f5c2a25ef4..a8085ac9cbeb01bdc4c7bb6331ef1b72f6380765 100644 (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()