Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
2012-03-20 10:17
477 查看
Hibernate+Struts2+Spring,
数据库是SQL Server 2008,
这个问题怎么解决啊。
用户表,BbsUsers:
<id name="ruid" type="java.lang.Integer" unsaved-value="null">
<column name="RUID" />
<generator class="native"></generator>
</id>
<many-to-one name="bbsUsers" insert="true" class="com.it94hao.entity.BbsUsers"
fetch="select">
<column name="UID" length="64" />
</many-to-one>
用户角色表,BbsRoleUser:
<id name="uid" type="java.lang.String">
<column name="UID" length="64" />
<generator class="assigned"></generator>
</id>
<set name="bbsRoleUsers" lazy="false" inverse="false" cascade="all">
<key>
<column name="UID" length="64" />
</key>
<one-to-many class="com.it94hao.entity.BbsRoleUser" />
</set>
给用户添加角色,如果开始没有角色那么就不会出异常,
如果有角色,那么我是先把原来的角色全部删除,然后再添加的,
就会报一个:Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 ,异常
数据库是SQL Server 2008,
这个问题怎么解决啊。
用户表,BbsUsers:
<id name="ruid" type="java.lang.Integer" unsaved-value="null">
<column name="RUID" />
<generator class="native"></generator>
</id>
<many-to-one name="bbsUsers" insert="true" class="com.it94hao.entity.BbsUsers"
fetch="select">
<column name="UID" length="64" />
</many-to-one>
用户角色表,BbsRoleUser:
<id name="uid" type="java.lang.String">
<column name="UID" length="64" />
<generator class="assigned"></generator>
</id>
<set name="bbsRoleUsers" lazy="false" inverse="false" cascade="all">
<key>
<column name="UID" length="64" />
</key>
<one-to-many class="com.it94hao.entity.BbsRoleUser" />
</set>
给用户添加角色,如果开始没有角色那么就不会出异常,
如果有角色,那么我是先把原来的角色全部删除,然后再添加的,
就会报一个: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问题的解法
- 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
- 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
- hibernate 报错: 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
- 20.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
- bug:Batch update returned unexpected row count from update: 0 actual row count: 2 expected: 1
- Batch update returned unexpected row count from update [0]; actual row count: 3; 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;