关于Hibernate:No row with the given identifier exists报错的解决办法
来源:互联网 发布:广联达相关软件 编辑:程序博客网 时间:2024/05/21 14:59
我们在用many-to-one配置关联的时候,有时关联查询会报No row with the given identifier exists的错误,究其原因是数据不完整(关联的对象值为null),产生脏数据。对此解决这个报错信息的方法一般有两个:
一、改数据
找到脏数据源头,删除或更改,不过个人不怎么建议使用这个方法。
二、在many-to-one配置的时候将策略为忽略。
由于在配置many-to-one的时候,没有配置not-found属性,该属性值就默认为Exception,也就是抛出异常,我们只将这个属性值改为ignore即可(忽略)。例如
<many-to-one name="conPo" class="com.keda.project.peijian.inproc.po.KedaPjInprocConsmatmain" fetch="select" lazy="false" not-null="false" **not-found="ignore"** column="conid" insert="false" update="false" />
0 0
- 关于Hibernate:No row with the given identifier exists报错的解决办法
- 关于使用Hibernate出现报错No row with the given identifier exists:
- no row with the given identifier exists报错
- 【hibernate】关于org.hibernate.ObjectNotFoundException: No row with the given identifier exists 的快捷解决问题
- hibernate中出现No row with the given identifier exists问题的解决办法
- 关于org.hibernate.ObjectNotFoundException: No row with the given identifier exists 的快捷解决问题
- 关于org.hibernate.ObjectNotFoundException: No row with the given identifier exists 的快捷解决问题
- 关于org.hibernate.ObjectNotFoundException: No row with the given identifier exists 的快捷解决问题
- Hibernate: No row with the given identifier exists
- Hibernate: No row with the given identifier exists错误
- Hibernate: No row with the given identifier exists
- Hibernate中No row with the given identifier exists
- org.hibernate.ObjectNotFoundException: No row with the given identifier exists
- Hibernate异常No row with the given identifier exists 解决方法
- Hibernate异常No row with the given identifier exists 解决方法
- Hibernate异常No row with the given identifier exists 解决方法
- org.hibernate.ObjectNotFoundException: No row with the given identifier exists
- Hibernate: No row with the given identifier exists错误
- swftool pdf2swf使用
- Swift 随堂笔记
- has stopped错误
- linux 下如何删除 开头是减号的文件名
- TCP协议三次握手连接四次握手断开和DOS攻击
- 关于Hibernate:No row with the given identifier exists报错的解决办法
- struts-tags的使用
- spring-基于注释(Annotation)的配置(转)----1
- QT程序发布自动添加QT中依赖的dll
- ASP.NET 获取IP和MAC地址
- Linux物理内存管理概述
- 第一次写博客
- linux学习教程(六) 命令技巧小节
- 登录Ubuntu是只提示public key登录解决方案