mark all as read

This commit is contained in:
Athou
2013-03-25 21:01:29 +01:00
parent 2c3a5274be
commit fa83a6a903
9 changed files with 81 additions and 27 deletions

View File

@@ -40,7 +40,7 @@ public class FeedEntryService extends GenericDAO<FeedEntry, Long> {
}
private TypedQuery<FeedEntry> unreadQuery(Feed feed, User user) {
String query = "select e from FeedEntry e where e.feed=:feed and not exists (select s from FeedEntryStatus s where s.entry = e and s.user =:user and s.read = true)";
String query = "select e from FeedEntry e where e.feed =:feed and not exists (select s from FeedEntryStatus s where s.entry = e and s.user =:user and s.read = true)";
TypedQuery<FeedEntry> typedQuery = em.createQuery(query,
FeedEntry.class);
typedQuery.setParameter("feed", feed);