I have two domain-classes.
class UsersAddThese {
String someData
}
and
class TheseAreConstantlyGenerated {
UsersAddThese theProblem
}
Is there some way to delete a UsersAddThese
and automatically delete all the TheseAreConstantlyGenerated
or should I just add in logic to findAllByTheProblem
and then iterate and delete. (I would prefer if it could be done automatically so I can add new Generated classes that refer to UsersAddThese
and not change the delete controller.)
Alternatively, is there some way to just tell GORM, "If something else depends on what I am deleting so as to cause ERROR util.JDBCExceptionReporter - Cannot delete or update a parent row: a foreign key constraint fails
, delete that too - recursively."