-->
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.  [ 6 posts ] 
Author Message
 Post subject: Forced update
PostPosted: Mon Nov 03, 2003 4:49 am 
Newbie

Joined: Mon Oct 13, 2003 7:50 am
Posts: 7
Hi,

I am using the optismistic feature of the hibernate. But, in some places I need not worry about the current version of the row. Meaning, I just want to update some column which no other thread would have modified since I read. Is it possible to do a forced update while using the optimistic locking?

Thanks in advance,
Younus


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 03, 2003 4:56 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Hmmm. I'm sympathetic to this request, but I'm not sure exactly what an API for this would look like.

HB-426 is one possibility.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 03, 2003 5:00 am 
Newbie

Joined: Mon Oct 13, 2003 7:50 am
Posts: 7
Hi Gavin,

What is HB-426? This is the first time I am coming across this. Can you give me more details about this.

Thanks,
Younus


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 03, 2003 5:01 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
http://opensource.atlassian.com/project ... key=HB-426


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 03, 2003 5:13 am 
Newbie

Joined: Mon Oct 13, 2003 7:50 am
Posts: 7
Hi Gavin,

Why cant we have a method like forceUpdate(Object obj) in the Session, which will update the state of the object witout worrying about the current state in the DB?


Thanks
Younus


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 03, 2003 5:15 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
No!!

Do you have any concept of how much I HATE adding new methods to the Session interface.


Actually, it is kinda already there:

Code:
Session.replicate(foo, ReplicationMode.OVERWRITE)


(Hibernate 2.1.)

But note that this operates on the entire object graph. It does not "stop" where cascades stop.


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