I am using Hibernate JPA 2 (hibernate-entitymanager-3.5.5) and hibernate-validator-4.1.0 with constraint annotations and I am able to get a set of ConstraintViolation objects on an @Entity when I use the Validator.validate() but when I persist() the same entity no ConstraintViolationException is thrown.
I have specified the following in persistence.xml:
Code:
<properties>
<property name="javax.persistence.validation.mode" value="callback, ddl" />
</properties>
My understanding was that the validation listener on entity management with such a configuration is automatic but maybe I am missing something.
I also use Spring 3 and Java 5.
Regards,
Laurent