I'm migrating my WildFly version from 8.1 (Hibernate 4.3.5) to 11.0 (Hibernate 5.1.10), and a new error just appears now:
Caused by: org.hibernate.loader.MultipleBagFetchException: cannot simultaneously fetch multiple bags: [InformeMensalINR.aplicacoesEfetuadas, InformeMensalINR.recursosTransferidos]
The mapping is below and used to work fine on Hibernate 4:
@OneToMany(mappedBy="informeMensalINR",cascade=CascadeType.ALL,fetch=FetchType.EAGER,orphanRemoval=true)
public List<RecursoTransferido> getRecursosTransferidos() {
return recursosTransferidos;
}
@OneToMany(mappedBy="informeMensalINR",cascade=CascadeType.ALL,fetch=FetchType.EAGER,orphanRemoval=true)
public List<AplicacaoEfetuada> getAplicacoesEfetuadas() {
return aplicacoesEfetuadas;
}
Any ideas on why is this happening now? In WildFly 8 it works great. I didn't find anything in Hibernate JIRA related to this problem.