I have a Cloud Firestore database for transportations:
- Transportations {collection}
- TransportationId {document}
- TransportationName: "Private Transaportation"
- Cars {collection}
- CarId {document}
- CarName: "Taxi"
- CarId {document}
- CarName: "Private Taxi"
- CarId {document}
- TransportationId {document}
In Cars
collection I have over 100 cars (documents). I cannot find in the documentation nor on stackoverflow how to get all the transportation names in which the CarName
name has a specific particular value. How to solve this?
val Taxi = db
.collection("Transportations").document("TransportationId")
.collection("Cars").whereEqualTo("CarName", "Private Taxi")
Thanks!