(lazy) m:n relation + EventListener = AssertionFailure: collection [n-side] was not processed by flush()
链接:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2763
hibernate的event系统和它原有的机制有点区别.....如果想通过preUpdate or PostUpdate去修改原先的值,还是不要了,因为这样lazy就不能用了.....
这哥们总结的好:
My conclusion was, that you have not to change the state of the current object in the current session within events.
But if you want only use changed attributes - use the findDirty() (ore something called like this)(实际上是getOldState()) to touch only changed (and loaded) attributes.
分享到:
相关推荐
NULL 博文链接:https://imp9527.iteye.com/blog/438677
由jbosstools创建xmll文件出现bug
hibernate 资料hibernate 资料hibernate 资料hibernate 资料
Hibernate Synchronizer 插件重大缺陷改正
hibernate3hibernate3hibernate3hibernate3hibernate3hibernate3hibernate3hibernate3
hibernate教程hibernate教程hibernate教程
hibernate annotation hibernate3
hibernate5 hibernate PDF 讲义 动力 hibernate ssh hibernate5 节点
In a recent poll, Hibernate was among the top five tools used by many Java developers every day. This shows that SQL databases are still the preferred technology for reliable data storage and ...
hibernate 5.2.15 hibernate 5.2.15 hibernate 5.2.15 hibernate 5.2.15 hibernate 5.2.15hibernate 5.2.15
Hibernate.jar包,Hibernate可以应用在任何使用JDBC的场合,包含 hibernate-commons-annotations-4.0.1.Final.jar hibernate-core-4.1.12.Final.jar hibernate-ehcache-4.1.12.Final.jar hibernate-entitymanager-...
Hibernate连表查询 Hibernate连表查询
hibernate,hibernate,hibernate,hibernate,hibernate,hibernate,hibernate,hibernate,hibernate,hibernate,hibernate,hibernate,hibernate,hibernate,hibernate,hibernate,包含4个说明文档,分别详细解说了hibernate...
hibernate 实战 hibernate 实战 hibernate 实战 hibernate 实战
hibernate第一个hibernate
HIBERNATE HIBERNATE HIBERNATE HIBERNATE
Hibernate留言板Hibernate留言板Hibernate留言板Hibernate留言板Hibernate留言板Hibernate留言板Hibernate留言板Hibernate留言板Hibernate留言板Hibernate留言板Hibernate留言板Hibernate留言板
Hibernate面试题专栏 - 最全的Hibernate面试题, Hibernate笔试题, Hibernate问题 Hibernate教程
但这个连接池性能不佳,且存在诸多BUG(笔者就曾在Mysql环境下被八小时连接悬空问题困扰过),因此官方也只是建议仅在开发环境下使用。 三、Hibernate2和Hibernate3的命名空间有所变化。例如,配置C3P0时的provider...
hibernate