Hello,
We have an active object class like this :
@Table("OBJECT_A") public interface ObjectA extends RawEntity<Long> { .. .. public void setObjectB(Object b); public ObjectB getObjectB(); } @Table("OBJECT_B") @Preload public interface ObjectB extends RawEntity<Long> { .. .. public void setName(String n); public String getName(); }
We use an activeobject find method to find all Object's a and we would like to load all object B at the same time...
ObjectA[] o = (ObjectA[])ao.find(ObjectA.class, Query.select().where(where, params)); for(int i = 0; i < o.length; i++) { System.out.println(o.getObjectB().getName()); // AT EACH ITERATION A QUERY TO THE DATABAE IS MADE }
Even if we used the @Preload Annotation, it doesn't seems to do Eager Loading of the objects....
Anyone can give us input?
Regards.
Community moderators have prevented the ability to post new answers.
I'm having the same issue where the @Preload annotation doesn't seem to turn on eager loading.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.