-->
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.  [ 1 post ] 
Author Message
 Post subject: Updating 2 rows simultaneaously with a unique condition
PostPosted: Mon Apr 16, 2007 5:27 pm 
Newbie

Joined: Mon Apr 09, 2007 10:29 am
Posts: 14
Hi
I have a table structure
ID int
Q_ID (foriegn Key)
some columns
Order_Number int

In this there is condition that combination of Q_ID and Order_Number is Unique(Business Key). Now In my my objectCollection suppose I have change order_number for obj0(previously 1) to 2 and obj2(previously 2)to 1
and then call update on collection. Hibernate throws(basically database coz Nhibernate is changing one by one) an error that duplicate entry for key Q_ID and Order_Number but there is no violation as i am updating both simultaneaously.
Any Help on this as i have to allow to change the order number.

Regards
Saurabh


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.