-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: using cache
PostPosted: Wed Feb 18, 2004 6:53 am 
Newbie

Joined: Wed Oct 22, 2003 5:33 am
Posts: 10
Location: france
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 ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 18, 2004 9:30 am 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
I may be wrong, but the query cache holds only the IDs of the entities part of the result - not their actual content.
So what you may see in the log is Hibernate reloading the entities - but not querying the database.

Is it possible ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.