cascade="all-delete-orphan"
when i am using this property in set for delete child records,hibernate first execute update query for child table to update foriegnkey to null and then delete parent record and then delete child records.
But in my case foriegn key in child table is not null field, so i am getting FK constraint error while tring to update null to FK.
Note : Hibernate first tring to delete parent record and then delete child records, for this reason only it first update FK to null in child table.This is happening when we set cascade="all-delete-orphan".
Is this problem in Hibernate?
I dont want to explicitly delete child records.
any ideas or alternates...
Thanks in advance
Hibernate version:
3.1
Name and version of the database you are using:
Oracle 9i
The generated SQL (show_sql=true):
|