Hibernate错误信息:ObjectNotFoundException: No row with the given identifier exists

Hibernate错误信息:ObjectNotFoundException: No row with the given identifier exists

第一步:

检查数据库中,与CrmClass表,一对多的关联表中,是否有主键为ee050687bd1a4455a153d7bbb70000
08的数据

Hibernate错误信息:ObjectNotFoundException: No row with the given identifier exists

第二步:

发现第一步找到了,明明有啊,再细看错误日志

Hibernate错误信息:ObjectNotFoundException: No row with the given identifier exists

第三步:

查看.hbm.xml映射文件中的配置信息

Hibernate错误信息:ObjectNotFoundException: No row with the given identifier exists

找到错误:多对一关系中,class属性应该填写一那一方的类:CrmCourseType
更改:

Hibernate错误信息:ObjectNotFoundException: No row with the given identifier exists

大功告成,还是要细心,如果在第一步中,没有找到对应主键的数据,那就是数据错了,把数据改好就可以了

相关文章:

  • 2021-05-24
  • 2021-08-09
  • 2021-06-15
  • 2021-08-15
  • 2021-08-27
  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-20
  • 2022-12-23
  • 2022-02-16
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案