【发布时间】:2013-12-27 15:13:17
【问题描述】:
我有:
@ForeignCollectionField(eager = false)
private ForeignCollection<Field> fieldCollection;
我想用来自网络服务的数据填充这个集合,因为我想把这个数据插入到我的 Sqlite 数据库中。
我试过用这个:
boolean accessOnPremiseDb = false;
String description;
@ForeignCollectionField(eager = false)
private ForeignCollection<Entity> entitiyCollection =
new LazyForeignCollection<Entity, Integer>(null, accessOnPremiseDb,
accessOnPremiseDb, null, description, accessOnPremiseDb);
但我得到了错误
Caused by: java.lang.IllegalStateException: Internal DAO object is null.
Lazy collections cannot be used if they have been deserialized.
我怎样才能毫无问题地做到这一点?我应该为此创建新变量吗?
【问题讨论】:
标签: java android ormlite foreign-collection