I want to structure a participant-list, which contains keys to other objects.
My current structure:
- events
-- 12345678910 // eventKey
--- name
--- participants // contains userIds
---- A123456789: true
---- B123456789: true
- users
-- A123456789 // userId
--- Username: 'NameA'
-- B123456789 // userId
--- Username: 'NameB'
I just save the user ids in participant list to avoid redundant data and for easier maintenance.
My question: what is the best way, to retrieve the user data of all referenced user keys? Do i have to create a query for each user id?! Or is there a better way, to save references in firebase?
Thanks in advance