From 9d50517ceaeadaba227ccdbaa43a5918abd16728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 22 Jan 2015 17:18:56 +0100 Subject: migrating legacy to symfony --- .../Repository/EntriesRepository.php | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/WallabagBundle/Repository/EntriesRepository.php (limited to 'src/WallabagBundle/Repository/EntriesRepository.php') diff --git a/src/WallabagBundle/Repository/EntriesRepository.php b/src/WallabagBundle/Repository/EntriesRepository.php new file mode 100644 index 00000000..4c13c9c2 --- /dev/null +++ b/src/WallabagBundle/Repository/EntriesRepository.php @@ -0,0 +1,35 @@ +createQueryBuilder('e') + ->where('e.is_read = 0') + ->andWhere('e.user_id = :userId') + ->setParameter('userId', $userId) + ->getQuery(); + }*/ + public function findUnreadByUser($userId) + { + $qb = $this->createQueryBuilder('e') + ->select('e') + ->where('e.isRead = 0') + ->andWhere('e.userId =:userId')->setParameter('userId', $userId) + ->getQuery() + ->getResult(Query::HYDRATE_ARRAY); + + return $qb; + } +} -- cgit v1.2.3