Kingdom-to-Many Relationship

user and group relationship.

public class User extends RealmObject {
    public String uid;
    public String name;
    public RealmList<Group> groups;
}

public class Group extends RealmObject {
    public String gid;
    public String name;
    public RealmList<User> members;
}

But now there is a role called "creator" or "administrator" that refers to the relationship, neither to the user, nor to the group, how do I add a property to RealmObject?

+4
source share

Source: https://habr.com/ru/post/1670267/


All Articles