Sorry if this is a basic question. But I'm trying to find any references on the docs and I can't find them.
This is my xml so far
Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<!-- a SessionFactory instance listed as /jndi/name -->
<session-factory>
<!-- properties -->
<property name="query.imports">net.sf.hibernate.test, net.sf.hibernate.eg</property>
<property name="dialect">net.sf.hibernate.dialect.PostgreSQLDialect</property>
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="connection.url">jdbc:postgresql:recjug</property>
<property name="connection.username">postgres</property>
<property name="connection.password">postgres</property>
<property name="query.substitutions">yes 'Y', no 'N'</property>
<property name="connection.pool_size">10</property>
<property name="statement_cache.size">25</property>
<property name="proxool.pool_alias">pool1</property>
<property name="show_sql">true</property>
<property name="jdbc.batch_size">0</property>
<property name="jdbc.use_streams_for_binary">true</property>
<!-- mapping files -->
<mapping resource="br/org/recjug/site/entities/Group.hbm.xml"/>
<mapping resource="br/org/recjug/site/entities/Permission.hbm.xml"/>
<mapping resource="br/org/recjug/site/entities/User.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Where should I place my queries, like in the example
Code:
<query name="eg.DomesticCat.by.name.and.minimum.weight"><![CDATA[
from eg.DomesticCat as cat
where cat.name = ?
and cat.weight > ?
] ]></query>