I have:
@ForeignCollectionField(eager = false)
private ForeignCollection<Field> fieldCollection;
and I want to fill this collection from data coming from web service because I want to insert this data to my Sqlite database.
I tried to use this:
boolean accessOnPremiseDb = false;
String description;
@ForeignCollectionField(eager = false)
private ForeignCollection<Entity> entitiyCollection =
new LazyForeignCollection<Entity, Integer>(null, accessOnPremiseDb,
accessOnPremiseDb, null, description, accessOnPremiseDb);
but I got the error
Caused by: java.lang.IllegalStateException: Internal DAO object is null.
Lazy collections cannot be used if they have been deserialized.
How can I do that without problem? Should I make new variable for this?