-->
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: Use of cache in hibernate with load( ) and get( ) methods
PostPosted: Fri Sep 26, 2008 8:50 am 
Beginner
Beginner

Joined: Tue Aug 26, 2008 4:24 pm
Posts: 29
I have read about the methods load and get of Hibernate Session:

1. one or both try to use the cache to find an object first and if not connect to the database or just one?
2. if I always want to connect to the database and not use the cache what method should I use?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 26, 2008 10:03 am 
Beginner
Beginner

Joined: Wed Sep 24, 2008 5:44 pm
Posts: 34
Quote:
...if you just used session.load() instead of get(), hibernate will not hit the database. Instead it will return a proxy, or an actual instance if it was present in the current session, and that can be used to serve as a reference.


http://www.theserverside.com/news/threa ... d_id=43887


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.