阅读背景:

防止Hibernate会话刷新/存储无效的脏实体

来源:互联网 

I would like to know which approach to take to prevent Hibernate 4.3.4 (with Spring and Hibernate Vaidator) from flushing dirty entities. In my code, i use a manual implementation of Hibernate Validator (a .validate() method within the instance itself), which gets called just before saving an entity. The validate() method returns a list of errors, if any are found, otherwise a Session.update() is called to store the entity, followed by a commit of the transaction. I would like to know which approach to take to




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: