]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Repository/EntryRepository.php
relation between tags and entries
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Repository / EntryRepository.php
index 005142fc568707a9b2e807f390dbf2cca8814fb2..f6f60c6fec2cab86ade3867033df0489ed7eff77 100644 (file)
@@ -118,4 +118,15 @@ class EntryRepository extends EntityRepository
             ->getQuery()
             ->getResult();
     }
+
+    public function findOneWithTags()
+    {
+        $qb = $this->createQueryBuilder('e')
+            ->innerJoin('e.tags', 't')
+            ->addSelect('t');
+
+        return $qb
+            ->getQuery()
+            ->getOneOrNullResult();
+    }
 }