+ * @return array
+ */
+ public function findAllTagsWithEntries($userId)
+ {
+ return $this->createQueryBuilder('t')
+ ->leftJoin('t.entries', 'e')
+ ->where('e.user = :userId')->setParameter('userId', $userId)
+ ->getQuery()
+ ->getResult();
+ }
+
+ /**
+ * Used only in test case to get a tag for our entry.