I have <many-to-one > relation from "child" class to "parent" class. But no reverse association <one-to-many>/<many-to-many> from parent to child.
When I delete parent, it throws BatchUpdateException if any child was pointing to the row in parent(nested ConstraintViolationException)
How can I prevent DDL from generationg foreign key constrain for a simple <many-to-one> association??
Tried not-null="false", not-found="ignore", cascade="none" etc.. in the hbm.xml . still the schemaexport by build.xml generates a foreign key constraint which prevents me from deleting parent..
I want to delete parent even if childs may be referring. Please help!!!!
Thanks,
Hari Sujathan.
|