Files
commafeed/src/main/resources/META-INF/orm.xml

17 lines
897 B
XML
Raw Normal View History

2013-03-25 23:15:19 +01:00
<?xml version="1.0" encoding="UTF-8"?>
2013-03-25 23:33:06 +01:00
<entity-mappings version="2.0"
xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2013-03-25 23:15:19 +01:00
xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence/orm
http://java.sun.com/xml/ns/persistence/orm_2_0.xsd">
2013-03-25 23:33:06 +01:00
<named-query name="Entry.byGuids">
<query>select e from FeedEntry e where e.guid in :guids</query>
</named-query>
2013-03-25 23:15:19 +01:00
<named-query name="Entry.unreadByFeed">
<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)</query>
</named-query>
<named-query name="Entry.readByFeed">
<query>select e from FeedEntry e where e.feed=:feed and exists (select s from FeedEntryStatus s where s.entry = e and s.user =:user and s.read=true)</query>
</named-query>
</entity-mappings>