-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐛] Firestore orderBy treats FieldPath differently than where #6602
Comments
Apologies this has sat so long - I saw it when it first came in but had no immediate answer so kept silent, and it's been pretty busy for me in this repo and a couple others so I haven't had a chance to do any triage. With apologies for my response here being not just a lack-of-answer but requesting effort, the quickest way to move this forward is probably to add an e2e test that reproduces the issue in the firebase e2e set: https://github.com/invertase/react-native-firebase/blob/main/packages/firestore/e2e/issues.e2e.js We put issue-specific cases in there, and it is usually not too hard to get the test rig up and running - it's how all development is done in the repo (https://github.com/invertase/react-native-firebase/blob/main/tests/README.md) and the test app there (along with all the e2e tests) are exactly what qualifies all the builds for release / how we probe native APIs while making new features etc |
Yeah looks as though on Android at least, we just get the string value: String fieldPath = order.get("fieldPath"); whereas on a where query, we apply a fieldvalue: FieldPath fieldPath = FieldPath.of(Objects.requireNonNull(segmentArray)); So we'll need to modify the underlying JS code to send the fieldpath segment list and apply similar changes here. |
Interestingly we already send a FieldPath over to native, so looks like we'll need to add a test to handle this properly. |
Hello 👋, to help manage issues we automatically close stale issues.\n\nThis issue has been automatically marked as stale because it has not had activity for quite some time.\nHas this issue been fixed, or does it still require attention?\n\n> This issue will be closed in 15 days if no further activity occurs.\n\nThank you for your contributions. |
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
Thank you for your contributions. |
To my knowledge, it still needs attention |
Issue
If an inequality is used for a where query with a
FirebaseFirestoreTypes.FieldPath
field name, you trigger an exception 'Invalid query'. Seemingly becauseorderBy
handlesFirebaseFirestoreTypes.FieldPath
field names differentlyproduces:
(it is with and without backticks.)
On web, if you escape both, a query like this works.
react-native-firebase
version you're using that has this issue:14.11.1
Firebase
module(s) you're using that has the issue:firestore
TypeScript
?Y
&4.5.4
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: