HibernateObjectRetrievalFailureException

[size=medium]org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException: No row with the given identifier exists: [com.shenzhoutelecom.dao.bop.customer.model.TCustomer#0]; nested exception is org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.shenzhoutelecom.dao.bop.customer.model.TCustomer#0]


出现这个异常是数据库数据问题:
具体说明(个人目前理解):
table1(多) ,table2(一);
table1的映射文件中:
<many-to-one name="table2" class="com.Table2">
<column name="table2_id"></column>
</many-to-one>

当表table1中的table2_id 为null时不出现此异常;
当表table1中的table2_id 为某值时,而此值table2中并没有,则出现此异常
上述情况是在spring中整合hibernate出现的

如果单
在hibernate中的 则是 org.hibernate.ObjectNotFoundException ,情况一样 [/size]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值