这个异常是在 多对一关系映射时,一方表中对应的数据不存在才抛出的。
原来的配置:

<many-to-one class="com.art.model.user.UserInfo" fetch="join" name="userInfo" >
<column name="userId" unique="true"/>
</many-to-one>

修改后的:

<many-to-one class="com.art.model.user.UserInfo" fetch="join" name="userInfo" not-found="ignore">
<column name="userId" unique="true"/>
</many-to-one>

红色是修改的部分。意思是当对应的数据不存在时 忽略掉,用null值填充。该属性默认值:exception 。

Hibernate3.x异常No row with the given identifier exists 解决方法的更多相关文章

  1. org.hibernate.ObjectNotFoundException: No row with the given identifier exists解决办法

    hibernate-取消关联外键引用数据丢失抛异常的设置@NotFound hibernate项目里面配了很多many-to-one的关联,后台在查询数据时已经作了健全性判断,但还是经常抛出对象找不到 ...

  2. Hibernate报错:org.hibernate.ObjectNotFoundException: No row with the given identifier exists 解决办法

    报错信息: org.hibernate.event.internal.DefaultLoadEventListener onLoad INFO: HHH000327: Error performing ...

  3. Hibernate错误——No row with the given identifier exists

    错误 是用的是Hibernate自动建立的数据表,在进行数据库操作时,出现错误No row with the given identifier exists 解决 关系数据库一致性遭到了破坏,找到相关 ...

  4. No row with the given identifier exists[ArtProject.Domains.Users#2]

      产生此问题的原因:              有两张表,table1和table2. 产生此问题的原因就是table1里做了关联<one-to-one>或者<many-to-on ...

  5. (转)收集:Hibernate中常见问题 No row with the given identifier exists问题的原因及解决

    Hibernate中No row with the given identifier exists问题的原因及解决 产生此问题的原因: 有两张表,table1和table2.产生此问题的原因就是tab ...

  6. Hibernate常见问题 No row with the given identifier exists问题的解决办法及解决

    (1)在学习Hibernate的时候遇到了这个问题"No row with the given identifier exists"在网上一搜看到非常多人也遇到过这个问题! 问题的 ...

  7. (转)No row with the given identifier exists问题的解决

    产生此问题的原因:         有两张表,table1和table2.产生此问题的原因就是table1里做了关联<one-to-one>或者<many-to-one unique ...

  8. Hibernate中常见问题 No row with the given identifier exists问题

    收集:Hibernate中常见问题 No row with the given identifier exists问题的原因及解决 2007年11月21日 15:02:00 eyejava 阅读数:2 ...

  9. Tomcat异常 Multiple Contexts have a path of "/qqshl".解决方法

    Tomcat异常 Multiple Contexts have a path of "/qqshl".解决方法 找到tomcat映射文件Service.xml,将文件中的conte ...

随机推荐

  1. Windows界面编程第四篇 异形窗体 高富帅版 ---博客

    http://blog.csdn.net/morewindows/article/details/8451638

  2. mysql文件目录详解 LINUX

    http://www.cnblogs.com/yjf512/archive/2012/12/11/2813398.html

  3. VS2010下配置Winpcap 开发环境

    http://blog.csdn.net/taotaoyouarebaby/article/details/27326829

  4. MVC批量添加,增加一条记录的同时添加N条集合属性所对应的个体

    类别中包含一个产品的集合属性,如何向数据库添加一条类别记录的同时,添加任意多个产品. public class Product { [DisplayName("产品名称")] pu ...

  5. UML状态图

    状态图(Statechart digram)是系统分析的一种经常使用工具,系统分析员在对系统建模时,最先考虑的不是基于活动之间的控制流,而是基于状态之间的控制流,由于系统中对象的状态变化最易被发现和理 ...

  6. 一款DIY移动电源的性能

    文波很大 就这款产品,质量非常一般后面拿品胜的做个对比

  7. [Android] osx下如何使用SublimeText阅读Android系统源码

    reference to : http://www.jianshu.com/p/c295d2729ecf 平时使用Sublimetext都是打开单个文件,这次要导入几万个文件,这在一些ide中称为pr ...

  8. 端口复用技术简单了解;重用端口;socket复用端口

    端口复用相关点 多个应用复用端口,只有最后一个绑定的socket可以接受数据,所有socket都可以发送数据 使用端口复用技术时,所有的socket都开启端口复用,才可以实现端口复用 黑客技术,使用标 ...

  9. OpenCV学习(40) 人脸识别(4)

    在人脸识别模式类中,还实现了一种基于LBP直方图的人脸识别方法.LBP图的原理参照:http://www.cnblogs.com/mikewolf2002/p/3438698.html       在 ...

  10. go语言基础之copy的使用

    1.copy的使用 示例: package main //必须有个main包 import "fmt" func main() { srcSlice := []int{1, 2} ...