java.lang.IllegalStateException:无法获取类Entity的下一个结果

时间:2014-02-17 17:21:44

标签: android ormlite

@ForeignCollectionField(eager = false)
 private  Collection<Entity> entityCollection  ;   

我看到我的entityCollection中有一个元素来自ForeignCollectionField

  public  ArrayList<Entity> getCachedEntityCollection() {
            if (entityCollectionArray==null)
            {

                return  new ArrayList<Entity>(entityCollection);
            }
            return  entityCollectionArray;
        }

但是当我执行这一行时

return  new ArrayList<Entity>(entityCollection);

我得到了这个例外

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)

0 个答案:

没有答案