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…
Tag: cascade
Detached entity passed to persist when save the child data
I’m getting this error when submitting the form: org.hibernate.PersistentObjectException: detached entity passed to persist: com.project.pmet.model.Account; nested exception is javax.persistence.PersistenceException: org.hibernate.PersistentObjectException: detached entity passed to persist: com.project…