Nested Lists In Firebase
Trying to understand how to implement nested lists in Firebase. Problem reducible to: a 1-to-N messaging system, where, for each message, you wish to maintain a list of users who h
Solution 1:
Ah, just needed to use Map
instead of List
.
In my case:
publicclassMessage {
privateLong authorID;
privateString msg;
privateMap<String, Boolean> receivedBy;
privateMap<String, Boolean> readBy;
}
Now I understand how to use recursive structures with Firebase. Guess like most things, it is easy -- once you know how.
Post a Comment for "Nested Lists In Firebase"