-->
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.  [ 2 posts ] 
Author Message
 Post subject: saveOrUpdate() method problem in Many-to-Many mapping
PostPosted: Fri Jul 17, 2009 2:31 am 
Newbie

Joined: Fri Jul 17, 2009 1:00 am
Posts: 5
Hi All,
I have a problem with "Many-To-Many" mapping.
Scenario :
1.Person (emp_no, emp_name)
2.Role (role_no, role_name)
3.Persons_Roles (intersection). ( id (surrogate key), emp_no(fk), role_no(fk) )
(hbm files I have given inverse="true" casecade="save-update" - in both the set definition )

Everything is fine with the operations except saveOrUpdate() method.
When I'm updating the records, it 'deletes' existing records and 'insert' a new record.

How we can avoid this behaviour ?

Thanks & Regards,
Srinivas


Top
 Profile  
 
 Post subject: Re: saveOrUpdate() method problem in Many-to-Many mapping
PostPosted: Tue Jul 21, 2009 12:37 am 
Newbie

Joined: Fri Jul 17, 2009 1:00 am
Posts: 5
Any body can resolve this problem.Please.............


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