Closed Miguel-cancino closed 2 years ago
I believe it is simple, the firestore documentation shows that you can search for sub-collections in this way (example):
Firestore.instance.collection('users').doc(Firestore.instance.currentUser.uid).collection('orders').orderBy('id', descending: true);
Thank you. I've already tried, but I need to retrieve all users documents, not just current user´s documents.
If you are talking about Collection group queries, then the query goes like
Firestore.instance.collectionGroup('orders').getDocuments()
How retrieve a subcollection? The example just show a simple query.