-->
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: Versioning not for read operations?
PostPosted: Fri Dec 03, 2004 7:39 pm 
Newbie

Joined: Fri Oct 08, 2004 1:12 pm
Posts: 4
I have a database table with a version column, which is used by Hibernate to keep track of versioning. The table also has a trigger to ensure version value will increase whenver a update happens.

After rows in that table were updated by a different process, I ran a select query from Hibernate. The result was not what's in the database but a cached version from the current session.

I understand versioning in Hibernate might be designed to just handle concurrent update. But is there a way to make Hibernate smart enough to pick up the latest version when a outside update has occurred?

Thanks.

-Ken


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 03, 2004 8:41 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
session.refresh(o) ?

But isn't refreshing on a versioned/optimistic locked row against it's use ? ;)

_________________
Max
Don't forget to rate


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.