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
|