关于Error during managed flush [Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1]错误
控制台报错:
08:07:09.293 [http-bio-8080-exec-2] ERROR org.hibernate.internal.SessionImpl - HHH000346: Error during managed flush [Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1]
查阅许多博客得出了自己的理解,请大家指教:
由于存在隐藏表单进行回显,导致提交时value不是Null,而是"",而我设置的主键生成策略是uuid,所以无法赋值导致错误,解决方法是隐藏表单外面添加了if判断!

修改后为

关于Error during managed flush [Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1]错误的更多相关文章
- Nhibernate Batch update returned unexpected row count from update; actual row count: 0 解决方案
以前在session.Update(object).没发现啥问题,最近update的时候,老是报错:Nhibernate Batch update returned unexpected row co ...
- org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actua ...
- 20.org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actua ...
- Batch update returned unexpected row count from update [0] 异常处理
在one-to-many时遇到此异常,本以为是配置出错.在使用s标签开启debug模式,并在struts2主配置文件中添加异常映射,再次提交表单后得到以下异常详情. org.springframewo ...
- 关于Hibernate级联更新插入信息时提示主键不为空的问题“org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1 ”
org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual ...
- Batch update returned unexpected row count from update [0];
Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested ...
- Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
在操作hibernate数据库时,调用saveOrUpdate方法进行更新保存对象时, (1)ID为null时执行SAVE,但是前端jsp通过<input type="hidden&q ...
- 错误Batch update returned unexpected row count from update [0]; actual row count: 0;
参考:http://blog.csdn.net/ssyan/article/details/7471343 也是出现类似问题,在前台页面的隐藏域中判断id是否为null,而没有去判断是否为空字符串. ...
- hibernate 解决 org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
这是因为没有设置要更新的主键导致的,只要设置了要更新的主键就能更新成功(没有主键当然不能更新)
随机推荐
- 《CSS世界》读书笔记(六)
<!-- <CSS世界> 张鑫旭著 --> min-width/max-width和min-height/max-height min-width/max-width出现的场景 ...
- ci 配置ckeditor + ckfinder 无图片上传按钮
一:配置路径有问题 {$base_url}assets/js/editor/ckfinder/ckfinder.html --> http://www.cnblogs.com/assets/j ...
- liteos 从入门到放弃
这两天收到一份sdk,hisi 3516cv200 liteos的sdk 正好手头有硬件,就随便编译玩玩. 解压sdk. Hi3518E_SDK_V5.0.5.0 ll@ubuntu:~/work20 ...
- WinForm动态查询
WinForm 动态查询 1. 使用场景 在对数据进行筛选, 包含多个筛选字段时适用. 2. 接口设计 /// <summary> /// 定义可作为追加到 WHERE 子句的控件接口 / ...
- python from entry to abandon
学习Linux已经有大致两周了,依然感觉到自己仍然在运维的大门外徘徊.于是我想要找到一个在Linux之外的业余方向,可以以作为枯燥基础学习的调节.没过多久我就发现了Python可以说是钦定的选择,它作 ...
- Learning-Python【13】:迭代器和生成器
一.什么是迭代器 迭代指的是一个重复的过程,每一次重复都是基于上一次的结果而来的 # 这里的循环也是一个迭代,每次基于上一次的结果而取值 li = 'hello' i = 0 while i < ...
- org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'null' to required type 'double' for property 'band'; nested exception is org.springframework.core.convert.Con
本文为博主原创,未经允许不得转载: 先将异常粘贴出来: 20:37:26,909 ERROR [com.suning.fucdn.controller.ProductDataStaticsContro ...
- 深入探访支付宝双11十年路,技术凿穿焦虑与想象极限 | CYZONE特写
小蚂蚁说: 双11十年间,交易规模的指数级增长不断挑战人们的想象力,而对蚂蚁技术团队来说,这不仅是一场消费盛宴,而是无数次濒临压力和焦虑极限的体验,更是技术的练兵场.如今双11对蚂蚁金服而言,已经绝不 ...
- java笔记 -- java数据类型与类型转换
Java是一种强类型语言, 这就意味着必须为每一个变量声明一种类型. Java中一共有8中基本类型: 4种整型: 整型: 用于表示没有小数部分的数值, 允许为负数 类型 存储需求 取值范围 int: ...
- 新建vue项目中遇到的报错信息
在npm install的时候会报错,经过上网查阅资料之后,解决方法如下: 0.先升级npm版本:npm install -g npm 有可能是npm版本过低报错 1.然后清理缓存: npm ca ...