-
-
Notifications
You must be signed in to change notification settings - Fork 596
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
fix: Local datastore query with containedIn
not working when field is an array
#1666
Conversation
I will reformat the title to use the proper commit message syntax. |
Thanks for opening this pull request!
|
Codecov ReportBase: 99.89% // Head: 99.89% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## alpha #1666 +/- ##
=======================================
Coverage 99.89% 99.89%
=======================================
Files 61 61
Lines 5973 5977 +4
Branches 1367 1369 +2
=======================================
+ Hits 5967 5971 +4
Misses 6 6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Parse.Query.containedIn
not working when field is an array
Parse.Query.containedIn
not working when field is an arrayParse.Query.containedIn
not working when field is an array
Thanks for the PR; could you rephrase the PR title to make it easier to understand in the changelog what this actually fixes? The 2 references are related to LiveQuery - is this also LiveQuery related? |
@mtrezza The LocalDatastore is internally code copied from LiveQuery meaning queries that LiveQuery supports the LocalDatastore should support too. Those are just additional test cases that doesn't exist server side. |
How would you best describe the fix in
Or something more specific? |
It's the same fix as the |
For non array fields you are comparing a single value against an array. This fix checks a array against an array recursively. As I write this I realized that Without this fix we would have to rely on.
Array.indexOf(Array) will always return -1 |
The other PR is called "fix: liveQuery with containedIn not working when object field is an array". So how about this:
What do you conclude from the |
Parse.Query.containedIn
not working when field is an arraycontainedIn
not working when field is an array
@mtrezza I write a few additional test cases, I also think there might be an issue with |
@mtrezza This is ready for review |
Re-running CI I'm curious about these fails: https://github.com/parse-community/Parse-SDK-JS/actions/runs/4019619971/jobs/6906679057; it seems a connection error, do you have any idea what that could be since you've been looking at the flaky tests? |
@mtrezza I suspect it might be an issue with |
# [4.0.0-alpha.6](4.0.0-alpha.5...4.0.0-alpha.6) (2023-01-27) ### Bug Fixes * Local datastore query with `containedIn` not working when field is an array ([#1666](#1666)) ([2391bff](2391bff))
🎉 This change has been released in version 4.0.0-alpha.6 |
## [4.0.1-beta.1](4.0.0...4.0.1-beta.1) (2023-01-31) ### Bug Fixes * Local datastore query with `containedIn` not working when field is an array ([#1666](#1666)) ([2391bff](2391bff)) * Request execution time keeps increasing over time when using `Parse.Object.extend` ([#1682](#1682)) ([f555c43](f555c43))
🎉 This change has been released in version 4.0.1-beta.1 |
🎉 This change has been released in version 4.0.1 |
New Pull Request Checklist
Issue Description
Similar to parse-community/parse-server#8128
Closes: Added additional test case for parse-community/parse-server#8335
Approach
TODOs before merging