No row with the given identifier exists

来源:互联网 发布:性价比高的汽车知乎 编辑:程序博客网 时间:2024/05/19 18:37

No row with the given identifier exists


在hibernate配置文件中: <many-to-one> 中添加属性 not-found="ignore" 即: <many-to-one not-found="ignore" /> 即可。意思是如果查不到数据那就忽略,其默认值是exception,也就是默认查不到数据就抛异常

原创粉丝点击