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.  [ 3 posts ] 
Author Message
 Post subject: Version field not incrementing
PostPosted: Tue Oct 10, 2006 11:36 pm 
Newbie

Joined: Sat May 21, 2005 10:16 pm
Posts: 15
Greetings,

I will .SaveOrUpdateCopy on my object, and then lets say I try to do another .SaveOrUpdateCopy on my object again it will fail with a stale object exception since the Version field (I use the <version> tag for concurrency issues) has been incremented in the database but not in my object.

Do I have to call a Refresh in my object each time after I save to have the object be current when using the <version> tag?

Thanks,

Cable


Top
 Profile  
 
 Post subject: Any thoughts?
PostPosted: Wed Oct 11, 2006 6:25 pm 
Newbie

Joined: Sat May 21, 2005 10:16 pm
Posts: 15
Any thoughts?


Top
 Profile  
 
 Post subject: Interesting
PostPosted: Fri Oct 13, 2006 11:16 am 
Newbie

Joined: Sat May 21, 2005 10:16 pm
Posts: 15
So I figured I am stuck refreshing the object after I save it if I want to use it again and possibly save it again.

If I use the same session to refresh the object that I use to save it (after the comitt), it will not increment the version - why is this?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.