a different object with the same identifier value was already associated with the session.
来源:互联网 发布:网络小贷 资金来源 编辑:程序博客网 时间:2024/06/10 07:26
session.update(Object object)方法来对数据库进行更新的。而该方法在执行时,如果在session的缓冲区中存在与传入对象object有相同id的PO对象的话,就会抛出a different object with the same identifier value was already associated with the session.
解决办法:
用hql的方式直接对数据库进行修改
super.queryHql("update Customer u set u.email = ? where u.id = ?", obj);
参考文章
http://excon.iteye.com/blog/1085591
本文出自 “点滴积累” 博客,请务必保留此出处http://tianxingzhe.blog.51cto.com/3390077/1670923
0 0
- 解决a different object with the same identifier value was already associated with the session错误
- 解决a different object with the same identifier value was already associated with the session错误
- a different object with the same identifier value was already associated with the session的解决办法
- 解决a different object with the same identifier value was already associated with the session错误
- a different object with the same identifier value was already associated with the session
- a different object with the same identifier value was already associated with the session
- 解决a different object with the same identifier value was already associated with the session错误
- a different object with the same identifier value was already associated with the session
- a different object with the same identifier value was already associated with the session
- 再次碰到:a different object with the same identifier value was already associated with the session
- a different object with the same identifier value was already associated with the session
- 解决a different object with the same identifier value was already associated with the session错误
- 解决a different object with the same identifier value was already associated with the session错误
- HibernateSystemException: a different object with the same identifier value was already associated with the session.
- a different object with the same identifier value was already associated with the session
- a different object with the same identifier value was already associated with the session
- 解决a different object with the same identifier value was already associated with the session
- 解决a different object with the same identifier value was already associated with the session错误
- Struts中ModelDriven的使用
- hibernate中一级缓存和二级缓存
- session.invalidate()
- 使用时间戳解决浏览器缓存问题
- 中国电信天翼开放平台自定义短信验证码和模板短信demo
- a different object with the same identifier value was already associated with the session.
- linux终端绝佳配色方案
- Myeclipse SVN插件使用
- POJ 3269 中位数
- hibernate插入中文到mysql数据库乱码
- CentOS通过日志反查入侵
- 页面上画按钮的四种方法
- Eclipse中的Web项目无法自动部署到Tomcat
- jsp页面时间获取并判断