so i'm creating play java app , i'm using default ebean orm framework. have objects set in manytoone
, onetomany
bidirectional mapping.
the problem i'm having when simcard.find.all()
, @ pool
property in of returned objects, planpool
has properties null, except id.
here setup of objects:
simcard:
@entity public class simcard extends model { private static final long serialversionuid = 8664141460726922270l; @id public string simid; public string displayname; @manytoone public planpool pool; @onetomany(mappedby = "simcard") public list<simusage> usages; public static model.finder<string, simcard> find = new model.finder<string, simcard>(string.class, simcard.class); }
planpool:
@entity public class planpool extends model { private static final long serialversionuid = 4083095490040410160l; @id public long poolid; public string displayname; @manytoone public plan plan; @onetomany(mappedby = "pool") public list<simcard> simcards; @required public boolean isunlimited; @required public boolean isdefaultpool; @required public long maxbytes; @required public long maxcards; public static model.finder<long, planpool> find = new model.finder<long, planpool>(long.class, planpool.class); }
i have more objects set in same one-to-many, many-to-one fashion. problem same of them.
it appears set correct. manually inserting things database, , reason screwed ebean; couldn't pick mappings correctly. when use ebean methods (save, find, etc.), writes database correctly , works now.
on note, it's kind of weird values writes database put in, yet didn't work me. guess different can't see because results of find method consistent across different sessions.
Comments
Post a Comment