restore old query as it uses indexes

This commit is contained in:
Athou
2013-07-17 22:30:20 +02:00
parent 1d44e3519d
commit 85a353b872

View File

@@ -6,7 +6,7 @@
http://java.sun.com/xml/ns/persistence/orm_2_0.xsd">
<named-query name="EntryStatus.unreadCounts">
<query>select s.subscription.id, count(s) from FeedEntryStatus s where s.user=:user and s.read=false group by s.subscription.id</query>
<query>select sub.id, count(s) from FeedEntryStatus s LEFT JOIN s.subscription sub where sub.user=:user and s.read=false group by sub.id</query>
</named-query>
<named-query name="EntryStatus.existing">