@ForeignCollectionField(eager = false)
private Collection<Entity> entityCollection ;
I see that I have one element in my entityCollection from the type ForeignCollectionField
public ArrayList<Entity> getCachedEntityCollection() {
if (entityCollectionArray==null)
{
return new ArrayList<Entity>(entityCollection);
}
return entityCollectionArray;
}
but when I execute this line
return new ArrayList<Entity>(entityCollection);
I got this exception
java.lang.IllegalStateException: Could not get next result for class Entity
at com.j256.ormlite.stmt.SelectIterator.next(SelectIterator.java:183)
at com.j256.ormlite.dao.LazyForeignCollection.toArray(LazyForeignCollection.java:217)
at java.util.ArrayList.<init>(ArrayList.java:97)