-->
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: SELECT FOR UPDATE using Hibernate
PostPosted: Fri Jun 12, 2009 5:33 am 
Newbie

Joined: Tue Jun 09, 2009 4:49 am
Posts: 5
Hi all !
I have to issue a statement which locks a row in a table: is there any way to do it in Hibernate or do I have to use a native SQL query ?
thanks
john


Top
 Profile  
 
 Post subject: Re: SELECT FOR UPDATE using Hibernate
PostPosted: Mon Jun 15, 2009 1:25 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
sess.Lock(obj, LockMode.Upgrade);

http://nhforge.org/doc/nh/en/index.html#manipulatingdata-update-lock

_________________
--Wolfgang


Top
 Profile  
 
 Post subject: Re: SELECT FOR UPDATE using Hibernate
PostPosted: Mon Jun 15, 2009 3:57 am 
Newbie

Joined: Tue Jun 09, 2009 4:49 am
Posts: 5
thanks for you reply
regards
john


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.