I have two tables in my oracle database
Request and Approver. Every approver has a request. A foreign key protected by a constraint.
In my java code using kodo jdo 3.4 I call delete persistant on some or all of the approvers. Then at the end if no approvers are left I call delete persistant on the Request. When I commit I my integrity constraint fires because the sql is running in the wrong order I guess.
Is there a way to force the delete calls to the db to happen in a certain way?
I was also thinking of rolling back the transaction myself in the case where everything gets deleted and hand forcing the deletes in the correct order. But that seems like a hack.
Thanks