0
votes

So i have a post collection. Inside the "post" collection i have documents which has another collection called "likes".

So i want to get every single collection from every document at the same time and map them after. Is there a way to do that?

Because in Firebase you can only get a collection from just one document, but i want to get every collection from every single document.

1
Share your code - burrito

1 Answers

1
votes

If I correctly understand your question, you should use a Collection Group query. As explained in the doc, a "collection group consists of all collections with the same ID", i.e. likes in your case.

With such a query, you will get all the documents that are in all the likes sub-collections of all the documents in the post collection.