1
votes

Is it possible to get all the documents if child collection have specific doc ID?

I created a child collection inside of a locations to store not public data:

admin.firestore().collection('locations').doc()
.collection('private_data').doc()

As an admin I wanted to collect all the locations with specific doc ID from 'private_data' collection. For example get all the locations docs if 'private_data' has doc uid equals to k8AzwG...

admin.firestore().collection('locations').doc() .collection('private_data').doc(k8AzwG...)

1

1 Answers

1
votes

Firestore client-side SDKs don't offer the ability to make a query that yields collections. You can only make a query that yields documents. Whatever data you need from a query, you will have to find a way to model it so that a set of documents can be queried for the results of the query.