integration « Test « JPA Q&A





1. Integration test against a ConstraintViolationException    forum.hibernate.org

I get a org.hibernate.exception.ConstraintViolationException in an integration test. I have two tables, one is contact_referer and another one is contact. The contact has an external key pointing to the primary key of contact_referer. If a contact_referer is being used by a contact then the contact_referer should not be deletable. And indeed it is not deletable. I would like to check for ...