android - Realm - Relationships 1 to n -


i have 2 tables (dog & person) defined in realm object , need use 1:n relation.

my person class is:

public class person extends realmobject {         @primarykey         private int id;         private int age;         private dog dog;         /** getters & setters **/     } 

my dog class is:

public class dog extends realmobject {     @primarykey     public int id;     public string name;     /** getters & setters **/ } 

when table "dogs" contains data loading internet. need add dog id person table relationship, when save object person. if save "person" table dogid, dont join data. need select data person include dog name.

is possible in realm relationship? or use realm query, search dog id?

thank response.


Comments