firebase / firebase/firebase-js-sdk
FR: get doc of sub-collections at once
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 37
Description
### [REQUIRED] Describe your environment
* Operating System version: JS
* Firebase SDK version: 4.11
* Firebase Product: firestore
### [REQUIRED] Describe the problem
if we have some data like;
- collection-department
- dept1
- collection-employee
- emp2
- emp1
- dept2
- collection-employee
- emp5
- emp8
- dept3
- collection-employee
- emp6
- emp10
- another-collection
if we want the employees in dept1
`db.collection('/collection-department/dept1/collection-employee').get()`
we need to get all employees in all department in one request; something like
`db.collection('/collection-department/*/collection-employee').get()`
my case is efferent but this sample for explanation.. that we cant USE the sub collection feature if we miss this option.. our scenario have a thousand of document that share the same sub-collection and we need to get the data in single request not doing a thousands one...
Thanks
Contributor guide
Assessment
This issue has not been assessed yet.