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.  [ 1 post ] 
Author Message
 Post subject: Second Level Cache (Please somebody Help me)
PostPosted: Fri Jul 22, 2005 2:25 pm 
Newbie

Joined: Thu Jul 21, 2005 3:14 pm
Posts: 6
I have enabled second level cache using EHCache in Hibernate. I have a class Address (with a composite primary key consisiting of three columns) and other fields (four other fields). This class is mapped to db using Hibernate. Now I want to put all the rows in database into the cache so that I can use them afterwards.


1. When I use session.find() it puts all the rows in db into cache as net.sf.ehcache.Element and not as Address object. Every element has a key(corresponding to composite primary key above) and a value (consisiting of four other fields).

But the type of element that I am getting out of cache is of type Element and not my Address type.

How can I get Address object back?

Thanks

Ashish


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

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.