我建了二张表是一对多关系,SQL语句执行了,SQL语包执行情况:Hibernate: select newstype_.tid, newstype_.name as name1_, newstype_.res as res1_ from newstype newstype_ where newstype_.tid=?
Hibernate: insert into newstype (name, res, tid) values (?, ?, ?)
Hibernate: update newspress set tid=?, title=?, content=?, author=?, presstime=?, res=? where pid=?
但是数据没有保存成功,报以下错误:
Exception in thread "main" org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
如何解决
Hibernate: insert into newstype (name, res, tid) values (?, ?, ?)
Hibernate: update newspress set tid=?, title=?, content=?, author=?, presstime=?, res=? where pid=?
但是数据没有保存成功,报以下错误:
Exception in thread "main" org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
如何解决
解决方案 »
- httpsURLconnection 的 ClassCastException的问题
- 一道java算法面试题(200分)
- 我使用了SSH标注来开发我的项目,但是注入不了Service实体类
- 有关: Struts2.0+spring+JPA 自定义分页标签
- 关于tiles的问题
- 求助:一个小hibernate问题,在线等待!谢谢!!
- 有没有正在或已经学会使用SunAppServer的牛人啊来交流一下经验
- 帮忙看看为什么InitialContext总是不成功
- 急!!求jboss应用手册或文档。
- pagehelper问题
- struts+spring+hibernate整合中出的问题
- 有没有开源的桌面级的数据库组件
楼主【z1018588】截止到2008-06-26 17:51:52的历史汇总数据(不包括此帖):
发帖数:0 发帖分:0
结贴数:0 结贴分:0
未结数:0 未结分:0
结贴率:-------------------结分率:-------------------
如何结贴请参考这里:http://topic.csdn.net/u/20080501/09/ef7ba1b3-6466-49f6-9d92-36fe6d471dd1.html
这个意思是 批量更新 返回了不可预料的行数。 是否有 设置 联级保存 .