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

<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. WindowsPhone&amp;Windows8.1&amp;Windows8&amp;Unity3d 填坑日记

    近期的游戏开发大体上接近尾声,总结了不少关于Unity3d面向Windows几大平台开发时遇到的各种坑以及怎样填坑的经验.总的来说,Windows8.1 Windows8/RT以及WindowsPho ...

  2. AES advanced encryption standard 2

    /* * FIPS-197 compliant AES implementation * * Copyright (C) 2006-2007 Christophe Devine * * Redistr ...

  3. WhatsApp & Tasker for Android – Read & Write messages

    WhatsApp & Tasker for Android – Read & Write messages The requirement for the automation is ...

  4. 电感式升压转换器-AIC1896 电感式升压转换器

    电感式升压转换器-AIC1896 AIC1896是一个脉冲宽度调变(Pulse-Width-Modulation;PWM)控制之升压型转换器,它可以提供一个定电流以驱动白光LED. (图五A)为升压转 ...

  5. AMD64 Instruction-Level Debugging With dbx

    http://www.oracle.com/technetwork/server-storage/solarisstudio/documentation/amd64-dbx-364568.html A ...

  6. linux系统负载相关的概念和度量

    系统负载有 CPU利用率 和 LoadAverage这2个概念. cpu利用率:cpu utilization,是进程(task)被内核调度进程实际分配了CPU资源后,在时间片内使用CPU进行工作运算 ...

  7. python文本 单独处理每个字符的方法汇总

    python文本 单独处理字符串每个字符的方法汇总 场景: 用每次处理一个字符的方式处理字符串 方法: 1.使用list(str) >>> a='abcdefg'    >&g ...

  8. DruidDataSource配置

    DruidDataSource大部分属性都是参考DBCP的,如果你原来就是使用DBCP,迁移是十分方便的. 参考配置 <bean id="dataSource" class= ...

  9. android破解

    1.adb shell dumpsys activity top 能够获取到当前程序的Activity信息 2.1.在invoke-static/invoke-virtual指令他的返回类型是V之后可 ...

  10. Mysql中与时间相关的统计分析

    最近项目需要统计一段日期范围内,根据每分钟.几分钟.每天分别统计汇总某些事件/指标的发生总次数,平均发生次数,因此总结了Mysql中与时间处理.统计相关的资料. 按分钟统计某一时间段内的数据 SELE ...