维护老系统时出现的问题,出现的原因我简述一下:

         table1与table2是关联表,T1中有T2的主键 "T1_id",当T1中的 "T2_id" 不为null时,而T2中的"T2_id"为空,那么就会报上面这个错。

         反之T1的"T2_id"为null,而T2中的"T2_id"不为null,没有任何影响。

         所以这个错误是由于数据不匹配出现的。

    解决方案:

        1.在映射文件里加上 not-found="ignore" ,这个方法我是百度到的,按道理是没问题的,但是没有生效,可以一试

        

        

        2.根据console中给出的信息,去排查相关表的主外键信息是否有问题。

         比如我的console中是 :org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.fpscc.model.UserAuthInfo#409]

         我去数据库中查了下,User_Auth_Info_id中没有 409 这一条数据,而另外一个和它有关联的表中的"User_Auth_Info_id"是有 409 这一条数据的,

         所以我稍微改动了下,就正常了。

org.hibernate.ObjectNotFoundException: No row with the given identifier exists的更多相关文章

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

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

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

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

  3. org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.zhuoshi.entity.Dep#1]

    报错信息: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.zhuoshi.e ...

  4. org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [cn.facekee.cms.entity.CmsFansgroup#195]

    刚开始报错还是报的稀奇古怪的错误,让我纠结了好久,再三检查报错的位置,发现并没有错误,最后认真分析查看每行报错的信息才找到如题所述的错误!!!!! 报这种错误的原因可能是POJO映射文件中的字段和数据 ...

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

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

  6. 关于Hibernate中No row with the given identifier exists问题的原因及解决

    今天遇到一个bug,截图如下 有两张表,table1和table2.产生此问题的原因就是table1里做了关联<one-to-one>或者<many-to-one unique=&q ...

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

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

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

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

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

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

随机推荐

  1. react-native 导航器 react-navigation 3.x 使用

    React-navigation 介绍 React Navigation 源于 React Native 社区对一个可扩展且易于使用的导航解决方案的需求,它完全使用 JavaScript 编写. (如 ...

  2. 根据RadioButtonList动态显示隐藏Div

    使用场景 今天在写项目的时候遇到一个需求,注册页面,用户先选择类型继而填表单,所以需要根据选择切换表单,使用的前端框架是MiniUI,但是在实现这个功能的时候mini.get()方法无法得到div元素 ...

  3. dataguard从库移动数据文件

    ------------方法1从库移动数据文件路径方法1--------------将表空间offline的方法不行 1.退出日志应用alter database recover managed st ...

  4. java截取2个指定字符之间的字符串

    /** * 截取字符串str中指定字符 strStart.strEnd之间的字符串 * * @param string * @param str1 * @param str2 * @return */ ...

  5. [Python数据挖掘]第3章、数据探索

    1.缺失值处理:删除.插补.不处理 2.离群点分析:简单统计量分析.3σ原则(数据服从正态分布).箱型图(最好用) 离群点(异常值)定义为小于QL-1.5IQR或大于Qu+1.5IQR import ...

  6. 数据服务器------sql

    服务器:能够在网站中提供各种(浏览网页,收发邮件视频,语言)等服务器的软件与硬件集合. 数据库服务器(软件):(特点:永久海量存储数据:高速的查询){所有其他软件没有的特点} 数据库服务器分类 网状数 ...

  7. Javascript的防抖和节流、VUE的防抖和节流

    js原生 函数防抖:将几次操作合并为一此操作进行.原理是维护一个计时器,规定在delay时间后触发函数,但是在delay时间内再次触发的话,就会取消之前的计时器而重新设置.这样一来,只有最后一次操作能 ...

  8. 【转载】系统吞吐量(TPS)、用户并发量、性能测试概念和公式

    系统吞度量要素 一个系统的吞度量(承压能力)与request对CPU的消耗.外部接口.IO等等紧密关联.单个reqeust 对CPU消耗越高,外部系统接口.IO影响速度越慢,系统吞吐能力越低,反之越高 ...

  9. office 2019 下载地址

    office2019激活密钥 W8W6K-3N7KK-PXB9H-8TD8W-BWTH9    Office2019下载地址: 下载地址 专业增强版(强烈推荐): http://officecdn.m ...

  10. macOS在使用音视频通话时会降低其他音频声音的解决方法

    在使用QQ进行通话时,背景无法播放音乐(声音过小),并且在QQ for mac中也没有进行调整的设置选项. Solution: printf "p *(char*)(void(*)())Au ...