-->
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: How to stop refreshing whole data after update ?
PostPosted: Fri Mar 28, 2008 3:45 am 
Newbie

Joined: Sat Oct 20, 2007 2:43 am
Posts: 11
Hi All,


When we update some records in database using hibernate , does hibernate do refereshment of whole data in the table? If it does, how can we stop it, because it takes allot of time to refresh the large amout of data.


thanks in advance
Pawan


Top
 Profile  
 
 Post subject: Re: How to stop refreshing whole data after update ?
PostPosted: Fri Mar 28, 2008 4:13 am 
Expert
Expert

Joined: Thu Jul 05, 2007 9:38 am
Posts: 287
pawanspace wrote:
Hi All,


When we update some records in database using hibernate , does hibernate do refereshment of whole data in the table? If it does, how can we stop it, because it takes allot of time to refresh the large amout of data.


thanks in advance
Pawan


What do you mean by refreshing?
-Doing updates to the whole table? No, hibernate doesn't do that. Although there are some cases with collections where it will delete the whole collection and insert it again in the database. Don't delete your collection object to stop that.

-Selecting the data from the db after the changes? No, hibernate doesn't do that, but you might somthing like this when you close the session after the change, thereby losing the first level cache.

Anything else? Well ... specify more clearly, use logging to see what hibernate is doing.

_________________
Please rate useful posts.


Schauderhaft: Softwaredevelopment, Projectmanagement, Qualitymanagement and all things "schauderhaft"


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 28, 2008 5:24 am 
Newbie

Joined: Sat Oct 20, 2007 2:43 am
Posts: 11
Hi,

Let me explain with example :

Suppose we have a List of products int he data base, We update some records in that collection, will hibernate reload the whole collection from the database into the cache or not?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 29, 2008 7:01 pm 
Expert
Expert

Joined: Thu Jul 05, 2007 9:38 am
Posts: 287
As far as I know hibernate doesn't load anything in the scenario you described.

But you can simply activate logging to check for yourself.

_________________
Please rate useful posts.


Schauderhaft: Softwaredevelopment, Projectmanagement, Qualitymanagement and all things "schauderhaft"


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.