Skip to content

Instantly share code, notes, and snippets.

@oznus
Last active August 29, 2015 14:17
Show Gist options
  • Save oznus/f671ce82333882058db3 to your computer and use it in GitHub Desktop.
Save oznus/f671ce82333882058db3 to your computer and use it in GitHub Desktop.
Realm object with one to many
public class User extends RealmObject {
@PrimaryKey
private int userId;
private String description;
private String sureName;
private String name;
private RealmList<Address> addresses;
//Gettes and Setters
public RealmList<Address> getAdress() {
return addresses;
}
public void setSureName(RelamList<Adresses> addresses) {
this.addresses = addresses;
}
//more getters and setters
.......
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment