I want to query all documents in the collection2 that respond to a certain criteria.
Query method uses a url that can't be adjusted to this scenario as the actual URL should be projects/[PROJECT_ID]/databases/(default)/documents/collection1/document1:runQuery in stead of projects/[PROJECT_ID]/databases/(default)/documents/:runQuery
Describe the solution you'd like
Add a parameter in the FirestoreQuery class to customize subpath var sub_collection_path: String = ""
Change url path to include the subpath if set. var url: String = _base_url + _extended_url + query.sub_collection_path + _query_suffix
Describe alternatives you've considered
Tried different REST combination, but subcollection are not allowed in the where condition. In general '/' is not allowed
Additional context
This has been implemented and test with success in my project
Hm. It used to be able to handle sub collections. I'm surprised it doesn't anymore. That said, if you have a fix, feel free to fork it and open a PR so I can take a look, happy to accept it.
Is your feature request related to a problem? Please describe. I have a database structured as
collection1 |_document1 |_collection2 |_document2 |_fields
I want to query all documents in the collection2 that respond to a certain criteria. Query method uses a url that can't be adjusted to this scenario as the actual URL should be
projects/[PROJECT_ID]/databases/(default)/documents/collection1/document1:runQuery
in stead ofprojects/[PROJECT_ID]/databases/(default)/documents/:runQuery
Describe the solution you'd like
var sub_collection_path: String = ""
var url: String = _base_url + _extended_url + query.sub_collection_path + _query_suffix
Describe alternatives you've considered Tried different REST combination, but subcollection are not allowed in the where condition. In general '/' is not allowed
Additional context This has been implemented and test with success in my project