I have below domain classes
@FetchGroup(name="Group1", attributes={
@FetchAttribute(name="aCase")
})
Class A{
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="CASE_UID", nullable=false, insertable=false,
updatable=false)
private ClassB aCase.....
}
Class B{
@OneToMany(mappedBy = "aCase", fetch = FetchType.Lazy)
private List<Class C> caseList;...
}
Class C{
...
}
Class Test{
OpenJPAEntityManager oem = OpenJPAPersistence.cast(em);
em.clear();
oem.getFetchPlan().setMaxFetchDepth(3).addFetchGroup("Group1");
}
My problem is Class C records are not getting eagerly fetched, there are
sperate queries that are getting fired . I want to fetch all the records in
a single query.
Can anyone help me..
OpenJPAQuery q1=oem.createQuery(statement.toString());
--
View this message in context:
http://openjpa.208410.n2.nabble.com/Fetchgroups-recursion-problem-tp3874382p7581598.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.