Closed dhodun closed 1 year ago
I check your PR and there was some problem it is not passing the tests you can check it here Test Report I made some changes and hopefully every thing is working now
Now you can pass id of document or a key.
Test.collection.filter("id", "in", [test.id]).fetch()
# OR with Key
Test.collection.filter("id", "in", [test.key]).fetch()
It will be great if you mention this feature in Documentation
update FireO version to v1.6.0
Firestore has the ability to query directly on a document ID using
__name__
,google.cloud.firestore_v1.field_path.FieldPath
though this is not available in FireO.https://stackoverflow.com/questions/48466028/query-firebase-firestore-documents-by-the-id/63803724#63803724
This is needed for queries where you want to filter on multiple document ids or you want to filter on a single document id and another field in a single query without having to pull down the document and inspect the contents.
This should be valid:
Or ideally
Actual behavior:
It is worth noting that you have to use the
in
operator and cannot use==
i.e. this seems not to be valid (even with firestore client). It will return 0 results in firestore emulator but error in Firestore.
This should still throw the following error as you would get directly from the firestore client: