I'm using EJB3 JPA with OpenJPA implementation.
I have an +@Entity Person+.
I get it from context. I can asses another +@Entity Institution+ using +@Entity Person+.
em.createQuery("select p from Person p");
Person -> getMandate -> getConvocation -> getInstitution
Institution has several fields. Field
id +(key field)+ is retrieved, but field
title doesn't.
Seems like because of too long way to Institution from Person, adapter in Runtime sets FetchType.Lazy for fields of entities which are far away from target entity.
Is it possible? Is there any way to put away this limitation
I don't want to manually invoke getters of instances in EBJ method where Person is retrieved:
List<Person> personList = em.createQuery("select p from Person p").getResultList();
for(Person p : personList){
p.getMandate().getConvocation().getInstitution();
}