hibernate4.0.1,出现错误 Error applying BeanValidation relational constraints。
需要在hibernate.cfg.xml中添加
<property name="javax.persistence.validation.mode">none</property>
由于javax.persistence.validation.mode的属性值默认是auto,所以会出错。
在hibernate.cfg.xml里将javax.persistence.validation.mode设置为none即可。