-->
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: Hibernate cascade annotation+swap records
PostPosted: Fri Sep 05, 2008 10:06 am 
Newbie

Joined: Fri Sep 05, 2008 9:56 am
Posts: 2
Hi,


I have a table where one column is primary key, other two columns are references to other two tables primary key's. The fourth column is a rank column.

My task is to update the rank for a person .Here rank is unique for a person so, when i update the rank for a person from 2 to 1, the person already having rank 1 should be updated to 2.
I tried to use cascadeType.SAVE_UPDATE.

Using this, i could only update the person from 2 to 1 , but unable to update
the person having rank 1 to 2.

I am using hibernate annotations.


Please Help me..


Thank you.


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.