org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.gaidea.ptims.po

来源:互联网 发布:淘宝高仿包店铺推荐 编辑:程序博客网 时间:2024/06/07 23:00

错误提示:org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.gaidea.ptims.po.practice.pro.PracticePro#0]

#后的是说在这个表中的记录ID不存在

方法一:更改多对一配置如下:

 <many-to-one name="genSyjxcenter" class="com.gaidea.ptims.po.GenSyjxcenter" not-found="ignore" fetch="select" lazy="false">

            <column name="CENTER_ID"/>

        </many-to-one>

方法二:修改数据库数据,增加指定的记录ID即可; 

0 0
原创粉丝点击