hibernate项目里面配了很多many-to-one的关联,后台在查询数据时已经作了健全性判断,但还是经常抛出对象找不到异常:
org.hibernate.ObjectNotFoundException: No row with the given identifier exists:
在有外键的实体类中找到关联的对象,在get方法上加注解
@NotFound(action=NotFoundAction.IGNORE)
hibernate项目里面配了很多many-to-one的关联,后台在查询数据时已经作了健全性判断,但还是经常抛出对象找不到异常:
org.hibernate.ObjectNotFoundException: No row with the given identifier exists:
在有外键的实体类中找到关联的对象,在get方法上加注解
@NotFound(action=NotFoundAction.IGNORE)