Hi, I am getting errors when updating fields which has a unique key constraint. Actually, the collection is having the changed values and there is no duplication in the unique key fields.
My records are as below Initially, A B -- -- 1 1 1 2 2 1 2 2 Now i Update the above records as A B Changes -- -- A B 1 1 = 1 2 - It Fails 1 2 = 1 3 - This updates correctly 2 1 = 2 2 - It Fails 2 2 = 2 3 - This updates correctly Am doing this with a Session.Persist and the Session.Flush. When i checked the query execution for this. I can see 4 update statements are executed, but it first executes the update statement of 1,1 to 1,2. But 1,2 already exists. So the update fails. Is there any way that we can order the execution of updates. So that 1,2 updates to 1,3 and then 1,1 updates to 1,2, which i feel should work. Any help is much appreciated. Regards Sujith -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
