Given:
I have an installation
"
Expect:
Application is deleted.
Current behavior:
Deletion fails with
javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: Referential integrity constraint violation: "FK50BF6BE1D969477E: PUBLIC.INSTALLATIONIMPL_CATEGORIES FOREIGN KEY(INSTALLATIONIMPL_ID) R EFERENCES PUBLIC.INSTALLATIONIMPL(ID)"; SQL statement: delete from InstallationImpl where id=? [23503-161]
This is caused by @ElementCollection in InstallationImpl. More details for instance here: http://stackoverflow.com/questions/3903202/how-to-do-bulk-delete-in-jpa-when-using-element-collections