->getQuery()
->getResult();
}
+
+ /**
+ * Fetch an entry with a tag. Only used for tests.
+ *
+ * @return Entry
+ */
+ public function findOneWithTags($userId)
+ {
+ $qb = $this->createQueryBuilder('e')
+ ->innerJoin('e.tags', 't')
+ ->addSelect('t')
+ ->where('t.user=:userId')->setParameter('userId', 1);
+
+ return $qb->getQuery()->getOneOrNullResult();
+
+ return $qb
+ ->getQuery()
+ ->getOneOrNullResult();
+ }
}