org.hibernate.ObjectNotFoundException: No row with the given identifier exists


org.hibernate.ObjectNotFoundException: No row with the given identifier exists




        解决:原来的配置:

                                     <many-to-one class="com.art.model.user.UserInfo" fetch="join" name="userInfo" >
  <column name="userId" unique="true"/>
</many-to-one>

修改后的:
<many-to-one class="com.art.model.user.UserInfo" fetch="join" name="userInfo"not-found="ignore">
  <column name="userId" unique="true"/>
</many-to-one>


如果使用注解not-found="ignore" 换成 @NotFound(action=NotFoundAction.IGNORE)


转载自:http://hi.baidu.com/270460591/item/959f101adca704e2ddeeca2b


你可能感兴趣的:(org.hibernate.ObjectNotFoundException: No row with the given identifier exists)