No row with the given identifier exists 解决方法
来源:互联网 发布:软件授权协议书模板 编辑:程序博客网 时间:2024/05/16 05:01
比如有两张表,a和b.产生此问题的原因就是a里做了关联<one-to-one>或者<many-to-one unique="true">(特殊的多对一映射,实际就是一对一)来关联b.
当hibernate查找的时候,b里的数据没有与a相匹配的,这样就会报No row with the given identifier exists这个错.(就是数据的问题!)
假如说,a里有自身的主键id1,还有b的主键id2,这两个字段.
如果hibenrate设置的单项关联,即使a中的id2为null值,b中id2中有值,查询都不会出错.但是如果a中的id2字段有值,但是这个值在b中主键值里并没有,就会报上面的错!
如果hibernate是双向关联,那么a中的id2为null值,但是b中如果有值,就会报这个错.这种情况目前的解决办法就是改成单项关联,或者把不对应的数据改对!
当hibernate查找的时候,b里的数据没有与a相匹配的,这样就会报No row with the given identifier exists这个错.(就是数据的问题!)
假如说,a里有自身的主键id1,还有b的主键id2,这两个字段.
如果hibenrate设置的单项关联,即使a中的id2为null值,b中id2中有值,查询都不会出错.但是如果a中的id2字段有值,但是这个值在b中主键值里并没有,就会报上面的错!
如果hibernate是双向关联,那么a中的id2为null值,但是b中如果有值,就会报这个错.这种情况目前的解决办法就是改成单项关联,或者把不对应的数据改对!
- No row with the given identifier exists 解决方法
- 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 解决方法
- No row with the given identifier exists 解决方法(集锦)
- Hibernate异常No row with the given identifier exists 解决方法
- hibernate异常No row with the given identifier exists 解决方法
- 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 解决方法
- No row with the given identifier exists 解决方法
- No row with the given identifier exists 解决方法
- Hibernate异常No row with the given identifier exists 解决方法
- No row with the given identifier exists
- No row with the given identifier exists
- No row with the given identifier exists
- 内部网中不同机器间的文件上传方法
- DELPHI 中的一些求时间间隔函数
- [思维方法]虚实结合--永不过时的创造性高效思维方法
- RTP与RTCP协议简介(合集)
- 用VC开发股票分析软件(二)
- No row with the given identifier exists 解决方法
- Ubuntu 下Java Swing不兼容的问题
- SQL Server 2008 的 Transact-SQL 语言增强
- jdk1.6新特性---支持javascript
- PCI: BIOS Bug: MCFG area at e0000000 is not E820-reserved pci:not using mmconfig戴尔机器非标准组件导致红帽企业版linux启动失败的解决
- RTSP协议 (中文协议定义)
- SQL Server 2008 的 Transact-SQL 语言增强(2)
- JRTPLIB@Conference DIY视频会议系统
- IBM Cluster 1350与CSM