I am having issue with Delete. Here is the situation:
- Company entity extends BaseUuidEntity, Soft delete = false, employees attribute.
- Employee entity, extends BaseUuidEntity, Soft delete = false, Inheritance strategy = joined, company attribute with On delete inverse = Cascade.
- FullTimeEmployee entity extends Employee, Soft delete = false.
- PartTimeEmployee entity extends Employee, Soft delete = false.
When I delete the Company entity, I expect the child employees to be deleted too. But I get the following:
MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`demo`.`demo_full_time_employee`, CONSTRAINT `FK_DEMO_FULL_TIME_EMPLOYEE_ID` FOREIGN KEY (`ID`) REFERENCES `DEMO_EMPLOYEE` (`ID`))
Is there something I can do to make the system cascade the delete to all employee tables?