Skip to content

Tag: cascade

How to cascade delete set of enums in JPA?

I have the roles field in User entity: when I try to delete user with a query, the referential integrity constraint violation occurs, because user is referenced from User_roles table. How to solve this in any way? DDL for related table shows i.e. it doesn’t contain ON DELETE CASCADE clause. I need it be…