-
Notifications
You must be signed in to change notification settings - Fork 585
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
Query with parameterized expression only considers last element in array #6222
Comments
In v12.0.0-rc.0 we fixed a bug related to You are using We have tests covering the |
I'll have to verify if upgrading to v12 will fix the bug where it crashes. As for the useQuery, I could reproduce it both with useQuery or querying directly using I created a project to reproduce the problem I'm having here, I tested it using an array of ObjectIds and in that case, the const many = persons.filtered("name in $0", ["Alice", "Dennis", "Bob"]);
expect(many.length).equal(2); |
This is fixed in Realm 12. |
How frequently does the bug occur?
Always
Description
I'm trying to use parameterized expressions in React Native, and I noticed that whenever I pass an array, it only considers the last element in the array.
The docs for the Realm Query Language shows this example:
My use case is slightly different and would be better expressed like this:
However, it's only ever returning records where targetType is "Flat" in that example, if you put "House" as the last element, it starts showing only those with targetType "House", if I use a random value that has 0 results ("Test" for example), it crashes the app but I'm unable to verify if that happens because of the query or just my application
Stacktrace & log output
No response
Can you reproduce the bug?
Always
Reproduction Steps
No response
Version
11.10.2
What services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
iOS 16.4
Build environment
Cocoapods version
~> 1.12
The text was updated successfully, but these errors were encountered: