android - Greendao: nested entities and relationships -


so have scenario:

there entity post has nested author entity. many-to-one relationship multiplepost's can created single author.

public class post{ @id long id;  long authorid; @toone(joinproperty = "authorid") author author; }  public class author{ @id long id; //this useless greendao. have here because flows rest endpoint. long postid; } 

when response rest endpoint, post entity pulled along author entity. authorid in post entity not flows rest endpoint.

question

  • when persist post entity sqlite db, fields of post entity pushed. author entity not pushed. tried setting authorid on post entity without luck. missing?


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -