-->
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: How hibernate get() and load() will work when query
PostPosted: Tue Dec 30, 2014 8:43 am 
Newbie

Joined: Thu Sep 22, 2011 9:06 am
Posts: 16
How hibernate get() and load() will work when query second times? Please correct me

get() -> 1) Check 1st Level Cache and 2) DB hit
load() -> 1) Check 1st Level Cache 2) Then 2nd Level Cache Then 3) DB hit
How it will work?

Suppose, I updated(or added) the record using native sql or diectly in the dabase means, how get() and load() will get the latest changes?

If that is the case, hibernate will update the cache automatically or we need to the fresh query to fill the cache( againg qury or session.refresh()?


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.