-->
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: Are there limitations to second level cache?
PostPosted: Thu Apr 05, 2007 5:50 pm 
Newbie

Joined: Fri Apr 08, 2005 11:29 am
Posts: 3
Hibernate version: 3.2.0.cr4

Hello,
I am using Spring with Hibernate.

I have been able to get simple objects to cache but when I try to cache an object that has a composite id and contains a set it will not cache. I have set <cache usage="read-write"/> in the .hbm, setup the ehcache config and am

Code:
        HibernateTemplate ht = getHibernateTemplate();
        ht.setCacheQueries(true);
        return ht.loadAll(clazz);


doing this to get the objects. The first time a single sql is generated that gets all the objects. Every time after that it seems to issue single sql statements for each object using the composite id.

Id there anything different with caching when you either have a composite id or a set?

_________________
Jon Turgeon


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 09, 2007 4:03 pm 
Newbie

Joined: Fri Apr 08, 2005 11:29 am
Posts: 3
I am still looking into this, does anyone know if it is even possible to use the second level cache on objects that have a composite id? I have noticed several un-answered threads that are about caching and composite id's.

_________________
Jon Turgeon


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.