Created
March 27, 2019 09:13
-
-
Save MaryKuz/b683e45f3d35c17dfe4732d89295da34 to your computer and use it in GitHub Desktop.
Two classes: University and Student
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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