ORMLite foreignAutoCreate "maybe" is not working, HELP!

60 views
Skip to first unread message

Mario Fiorentino

unread,
Jun 9, 2015, 7:42:04 PM6/9/15
to ormlit...@googlegroups.com
Dear all, here is my configuration. I've the following object:

OBJA
@DatabaseField
private int num;

@ForeignCollectionField(eager = true)
private Collection<OBJB> items;


OBJB
@DatabaseField
private String created;

@DatabaseField(foreign = true, foreignAutoRefresh = true, columnName = "OBJA_id", foreignAutoCreate = true)
private OBJA obja;

@ForeignCollectionField(eager = true)
private Collection<OBJC> objC;

@DatabaseField(foreign = true, foreignAutoRefresh = true, columnName = "OBJB_id", foreignAutoCreate = true)
private OBJB objb;


Storing the OBJA with all the OBJB and OBJC set, cause, in a retrieval phase of OBJA, to have empty values for children fields. 
Each class has got an auto-generated values specified in this way:

@DatabaseField(generatedId = true)
private int id;

I've seen that this was initially a bug of the foreignAutoCreate, but it seems has been solved. 
Could you please give me some suggestions? 

Really thanks a lot,
Mario




Reply all
Reply to author
Forward
0 new messages