I’am using GWT 2.4 with Hibernate and RequestFactory and I have queries like this one
contextA.getEntityById(id).with("elements").fire(new Receiver<EntityBaseProxy>() {
@Override
public void onSuccess(EntityBaseProxy entity) {
System.out.println(entity.getElements().size());
}
});
I’am little confused, when elements, which are the children of the entity, are fetched lazily, I get a NullPointer in System.out.println(entity.getElements().size());
My first solution :
entity.getElements()getElementsFromBd()getElementsFromBd()in the EntityProxygetElementsFromBd()instead ofgetElementsFromBd()Presenter
Entity model
Thanks everybody
EDIT
I ended up using a servlet that extends RequestFactoryServlet where I begin and commit the transactions
}