org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1

batch:批量

unexpected:意想不到的

actual:实际

expected:预期

报错原因:使用Hibernate的update进行更新时,对象的主键值为空。

org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1的更多相关文章

  1. 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 ...

  2. 关于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 ...

  3. Batch update returned unexpected row count from update [0] 异常处理

    在one-to-many时遇到此异常,本以为是配置出错.在使用s标签开启debug模式,并在struts2主配置文件中添加异常映射,再次提交表单后得到以下异常详情. org.springframewo ...

  4. 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 ...

  5. 关于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: Err ...

  6. Nhibernate Batch update returned unexpected row count from update; actual row count: 0 解决方案

    以前在session.Update(object).没发现啥问题,最近update的时候,老是报错:Nhibernate Batch update returned unexpected row co ...

  7. hibernate 解决 org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1

    这是因为没有设置要更新的主键导致的,只要设置了要更新的主键就能更新成功(没有主键当然不能更新)

  8. 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 ...

  9. 异常:Batch update returned unexpected row count from update [0]; actual row count: 0;

    使用了hibernate的主键生成策略,而在程序中又主动去设置了主键值.<class name="ProductRegion" table="PRODUCT_REG ...

随机推荐

  1. 第四章_PHP基本语法(2)

    1.常量的声明 在PHP中,定义常量使用define()函数来实现 2.魔术常量 名称 作用 __LINE__ 返回文件中的当前行号 __FILE__ 返回该文件的完整路径和文件名 __DIR__ 返 ...

  2. node.js回调函数 - 阻塞与非阻塞

    1.阻塞调用(读取完文件再执行后面的操作) var fs = require("fs"); var data = fs.readFileSync('/fs.txt'); conso ...

  3. Winform主窗体的设置

    软件必然涉及到一个主窗体MainForm,下面介绍一下几个简单的属性设置,可能比较有用 (1)icon,当然是咱们软件的图标了,设置上去即可 (2)isMdiContainer,这个比较重要了哦,必须 ...

  4. js方法和原型继承(一)

    在js语言规范中并不存在方法这一概念,方便起见,将作为对象属性的函数成为方法this引用的规则a.在最外层代码中,this引用的是全局对象b.在函数内,this引用根据函数调用方式不同而不同函数内部的 ...

  5. 第十九章 数据访问(In .net4.5) 之 处理数据

    1. 概述 本章介绍 数据库.Json和Xml.web services 三种介质上的数据操作. 2. 主要内容 2.1 数据库 ① 建立连接 .net平台中的数据连接类都继承自DbConnectio ...

  6. 在mac上安装pydev for eclipse时,在eclipse的Preferences中无法显示出来的解决方法

    参考http://pydev.org/manual_101_install.html 中的说明,该插件依赖java7,在我安装eclipse之前并没有安装jdk,打开eclipse之后,自动安装了一个 ...

  7. [转]浅谈Python web框架

    说到web framework,Ruby的世界Rails一统江湖,而Python则是一个百花齐放的世界,各种micro-framework.framework不可胜数,不完全列表见:http://wi ...

  8. R语言的字符串处理

    R语言字符串的拼接 content<-paste("124235","789","124",sep="@") 运行 ...

  9. hdu 5535 Cake 构造+记忆化搜索

    链接:http://acm.hdu.edu.cn/showproblem.php?pid=5355 题意:给定n与m,其中1<= n <= 1e5,2 <= m <= 10;问 ...

  10. .NET开源工作流RoadFlow-表单设计-文本框

    点击表单设计器工具栏上的文本框按钮,会弹出文本框属性对话框: 绑定字段:该文本框与表单属性设置中选择的表的某个字段绑定(该文本框中的值将会保存到该字段中). 默认值:该文本框的初始化值. 宽度:文本框 ...