When reading from a firestore subcollection does the data returned also include the data from the parent document as well? I am trying to minimize my network egress and keep my costs low so I'm wondering whether to put all user-relevant data in a user document subcollection or create an independent collection where the ID is the userID.
0
votes
1 Answers
0
votes
Firestore read operations always return information from a single collection, or (for collection group queries) from a group of collections with the same name.
If you need access to information from the parent document, you will have to read that explicitly from your application code. The only alternative would be to duplicate the information from that parent document into each document in its subcollection, which is relatively common in NoSQL databases.