aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository/EntryRepository.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-26 09:41:42 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-03-06 21:09:15 +0100
commit092ca70725b0263390e45c46f93828c613eca3f0 (patch)
tree7b9fe8b824505b645bda6896a3589f09e25b1ccc /src/Wallabag/CoreBundle/Repository/EntryRepository.php
parenta36737f4859e3acbddf5cfe90c279ba725a6d88a (diff)
downloadwallabag-092ca70725b0263390e45c46f93828c613eca3f0.tar.gz
wallabag-092ca70725b0263390e45c46f93828c613eca3f0.tar.zst
wallabag-092ca70725b0263390e45c46f93828c613eca3f0.zip
add relation between user and tags, tests are broken
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index 10fb9bf7..a8085ac9 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -124,11 +124,14 @@ class EntryRepository extends EntityRepository
124 * 124 *
125 * @return Entry 125 * @return Entry
126 */ 126 */
127 public function findOneWithTags() 127 public function findOneWithTags($userId)
128 { 128 {
129 $qb = $this->createQueryBuilder('e') 129 $qb = $this->createQueryBuilder('e')
130 ->innerJoin('e.tags', 't') 130 ->innerJoin('e.tags', 't')
131 ->addSelect('t'); 131 ->addSelect('t')
132 ->where('t.user=:userId')->setParameter('userId', 1);
133
134 return $qb->getQuery()->getOneOrNullResult();
132 135
133 return $qb 136 return $qb
134 ->getQuery() 137 ->getQuery()