Hi All, I have a Main Entity,SubEntity relation in my hbm file. where subEntity has one-to-many relation with main Entity.
i hv declared as <set name="SubEntity" lazy="true" inverse="true" cascade="all-delete-orphan" > in my hbm file.
While saving the Main Entity, i m facing an exception called ORA-00001: unique constraint violated. When i debug and check, the Hibernate is not removing the Old Entries in SubEntity table, instead trying to insert a duplicate record.
I have used Collection.clear() to clear old values and used the same Collection to add new Entries. but even i m getting the same problem
Can any one help me reg this..
Thanks in advance
|