-
-
Notifications
You must be signed in to change notification settings - Fork 467
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
fetchFirestoreCollection casting filter types to string #496
Comments
Value typing isn't something that was handled in the PR which added support for Firestore filters but I've added support for this in the above commit (currently on the dev branch). |
Bug report
CHECKLIST
[ x ] I have read the issue reporting guidelines
[ x ] I confirm this is a suspected bug or issue that will affect other users
Current behavior:
When creating a filter for a
fetchFirestoreCollection
request (on Android) and filtering using a number type (primitive number, not string encoded number), the query will always return0
results because the code inFirebasePlugin.java
which converts the filter array into an actual query object casts thevalue
entry as astring
primitive automatically.cordova-plugin-firebasex/src/android/FirebasePlugin.java
Lines 2162 to 2179 in 753e529
I have not tested this functionality on iOS yet, nor am I well versed enough in Obj-C to tell if this issue will exist on iOS based solely on the code.
Expected behavior:
The query should maintain the primitive number type for the query.
Steps to reproduce:
Environment information
9.0.0
Other information:
I'm not entirely certain how to resolve this issue cleanly. It doesn't appear that the
JSONArray
has a way to determine the primitive type (though the JSON syntax does denote this by omitting the quotes around primitive numbers).Reference: https://processing.org/reference/JSONArray.html
The only way I can see around this would involve additions to the filter object to specify type, which could be a breaking change if not handled correctly.
The text was updated successfully, but these errors were encountered: