错误:Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
2013-07-16 12:42
429 查看
Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
触发异常时的操作:执行hibernate插入新数据时,出现错误
异常的原因:由于主键设置为自增长,而在执行插入记录操作时,插入对象设置了ID的值导致。
解决方案:将要插入的对象的ID设置为null即可
触发异常时的操作:执行hibernate插入新数据时,出现错误
异常的原因:由于主键设置为自增长,而在执行插入记录操作时,插入对象设置了ID的值导致。
解决方案:将要插入的对象的ID设置为null即可
相关文章推荐
- 错误信息:Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
- Batch update returned unexpected row count from update; actual row count: 0; expected: 1
- Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
- Hibernate - Batch update returned unexpected row count from update: 0 actual row count: 0 expected:
- Hibernate:Batch update returned unexpected row count from update [0]; actual row count: 0; expected:
- Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
- spring.net nhibernate 不一定是自增变量,也可能是触发器 Batch update returned unexpected row count from update; actual row count: 2; expected: 1
- Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
- Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
- Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
- Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
- Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
- Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
- hibernate 报错: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 解决方法
- EXTJs错误:Batch update returned unexpected row count from update [0]; actual row count: 0;
- org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
- Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
- Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
- Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
- Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1