Apparantly JBoss deletes the parent object before the children when cascade-delete is specified in ejb-jar.xml. Is this right? Is this even logical? By specifying cascade-delete, I'm telling JBoss that the child object cannot exist without a parent. And yet, half way through the delete, the children are orphaned, in violation of the schema.
This isn't just philosophical; our app cannot delete the child without fetching reference info from the parent. If the parent is deleted first, then we cannot clean up the database properly.
How do I get JBoss to cascade-delete in the correct order?