return $this->sortQueryBuilder($this->getRawBuilderForUntaggedByUser($userId));
}
+ /**
+ * Retrieve entries with annotations for a user.
+ *
+ * @param int $userId
+ *
+ * @return QueryBuilder
+ */
+ public function getBuilderForAnnotationsByUser($userId)
+ {
+ return $this
+ ->getSortedQueryBuilderByUser($userId)
+ ->innerJoin('e.annotations', 'a')
+ ;
+ }
+
/**
* Retrieve untagged entries for a user.
*
$qb->leftJoin('e.tags', 't');
$qb->andWhere('t.id is null');
break;
+ case 'with_annotations':
+ $qb->leftJoin('e.annotations', 'a');
+ $qb->andWhere('a.id is not null');
+ break;
}
$ids = $qb->getQuery()->getArrayResult();