faster inserts

This commit is contained in:
Athou
2013-03-25 23:33:06 +01:00
parent ef209ea321
commit def27c5f9f
2 changed files with 32 additions and 7 deletions

View File

@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings version="2.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<entity-mappings version="2.0"
xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence/orm
http://java.sun.com/xml/ns/persistence/orm_2_0.xsd">
<named-query name="Entry.byGuids">
<query>select e from FeedEntry e where e.guid in :guids</query>
</named-query>
<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>