Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Two classes: University and Student
public class Student extends RealmObject {
@PrimaryKey
private String id;
@Required
private String name;
@Required
private Date birthday;
@Required
private String email;
// getters and setters
}
public class University extends RealmObject {
@PrimaryKey
private String id;
@Required
private String name;
private RealmList students;
// getters and setters
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment