hi everybody
im using hibernate with some class
these class have an auto increment id
and some field to query them
for example
<class name="Catalog" table="IC_CATALOG">
<id name="idDb" type="integer" column="IDDB" access="field">
<generator class="native"/>
</id>
<property name="code" column="CODE" type="string" length="50" access="field" not-null="true"/>
<property name="type" column="TYP" type="string" length="50" access="field" not-null="true"/>
<property name="partner" column="PARTNER" type="string" length="50" access="field" not-null="true"/>
<property name="label" column="LABE" type="string" length="50" access="field"/>
</class>
so when im loading a catalog, im using session.createQuery
with code, type, partner parameters and setCachable(true)
but in this case im not sure hibernate caching query result because when im turning on "show_sql" value, hibernate always requery catalog contents
what can i do to force hibernate using cache ?
|