<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings 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 orm_1_0.xsd"
               version="1.0">
      <named-query name="TaskEventsByTaskId">
          <query>
                select te
                  from TaskEvent te 
                 where te.taskId = :id
                 order by te.eventTime
          </query>
          <!-- hint name="org.hibernate.timeout" value="200"/ -->
      </named-query>
      
      <named-query name="TaskEventsByTypeByTaskId"> 
      <query>
        select te 
          from TaskEvent te 
         where te.taskId = :taskId 
           and te.type = :type
      </query>
      </named-query>
      
</entity-mappings>
