使用Hibernate 过程中 报—— cannot simultaneously fetch multiple bags
程序员文章站
2022-03-02 15:39:25
...
解决方法有:
1.将fetchType改为懒加载
2.加上注解@Fetch(FetchMode.SUBSELECT)
@Fetch(FetchMode.SUBSELECT)
public List<Model> getModels() {
return this.models;
}
推荐阅读
-
2010.04.08———cannot simultaneously fetch multiple bags异常
-
jpa cannot simultaneously fetch multiple bags OneToMany
-
Hibernate抓取策略以及如何避免cannot simultaneously fetch multiple bags异常
-
JPA的cannot simultaneously fetch multiple bags异常的解决
-
使用Hibernate 过程中 报—— cannot simultaneously fetch multiple bags
-
hibernate exception (cannot simultaneously fetch multiple bags)
-
“cannot simultaneously fetch multiple bags”的解决方法