Khalil Bouzekri Giorgio Vinci Try using a DDL ON_DELETE cascade on the FK. This way, you'll never get that ConstraintViolationException.