-->
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: Hibernate session shows stale data if DB updated otherwise..
PostPosted: Thu Sep 18, 2008 4:01 pm 
Newbie

Joined: Thu Sep 18, 2008 3:19 pm
Posts: 1
I am updating my DB using back-end queries, and if i try to access the same using a Hibernate Session of a already logged-in user, i see stale data. If i logout and login again, i see fresh data back again.
My HIbernate session is no way attached or cached in http session.
Any clues ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 4:16 pm 
Expert
Expert

Joined: Mon Nov 26, 2007 2:29 pm
Posts: 443
That is exactly how Hibernate is supposed to behave.
Only the result of a query.list() is guaranteed to return fresh data all the time.

_________________
Gonzalo Díaz


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 4:22 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Quote:
That is exactly how Hibernate is supposed to behave.


Yes, it is.

Quote:
Only the result of a query.list() is guaranteed to return fresh data all the time.


No, it isn't.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 6:08 pm 
Expert
Expert

Joined: Mon Nov 26, 2007 2:29 pm
Posts: 443
Typical arrogant, uninformative response from the Hibernate team.
Get down from your horses, dudes.

_________________
Gonzalo Díaz


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.