-->
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.  [ 4 posts ] 
Author Message
 Post subject: Cached Instances
PostPosted: Fri Apr 30, 2004 12:07 pm 
Newbie

Joined: Wed Feb 04, 2004 10:31 pm
Posts: 10
I have an application where I am caching all objects represeneed by tables what are small and rarely changed. When I map a foreigh key to these objects hibernate seems to create a new instance rather than using an existing value. Short of a custom accessor which reads the cached value how do I tell hibernate to reuse existing instances


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 30, 2004 1:49 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
You mean object returned is not the same as the one insterted instance speaking.

This is due to tx consistency, hibernate has to give you another instance you can update and rollback

_________________
Emmanuel


Top
 Profile  
 
 Post subject: Cached Instances
PostPosted: Fri Apr 30, 2004 6:49 pm 
Newbie

Joined: Wed Feb 04, 2004 10:31 pm
Posts: 10
No consider a table like States - I do not ever want to update or rollback and would like a way to tell hibernate that


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 01, 2004 3:46 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Why is it a problem not to have the same instance

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.