-
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
Realm 5.0.0 filter not returning correct results #6540
Labels
Comments
Thanks for the detail. I believe I've been able to replicate this and still looking into this further. |
tgoyne
added a commit
to realm/realm-core
that referenced
this issue
May 29, 2020
The optimization added in #3432 to use the search index when performing equality queries over a link assumed that Queries would be evaluated in ascending table order, which is not always the case when the query is being performed on a link list. Fixes realm/realm-swift#6540.
tgoyne
added a commit
to realm/realm-core
that referenced
this issue
May 29, 2020
The optimization added in #3432 to use the search index when performing equality queries over a link assumed that Queries would be evaluated in ascending table order, which is not always the case when the query is being performed on a link list. Fixes realm/realm-swift#6540.
jedelbo
added a commit
to realm/realm-core
that referenced
this issue
Jun 2, 2020
…er (#3752) The optimization added in #3432 to use the search index when performing equality queries over a link assumed that Queries would be evaluated in ascending table order, which is not always the case when the query is being performed on a link list. Fixes realm/realm-swift#6540. * Remove an unused member variable Co-authored-by: Jørgen Edelbo <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Issue
Realm 5.0.0 filter not returning correct results when filtering on an objects List property.
Goals
Return the correct results
Expected Results
When filtering and there are 3 objects that match the filter, the results of the filter should contain 3 objects.
Actual Results
Sometimes the filter will return 1 result, other times two results, and rarely return all three results
Steps to Reproduce
A project with three Realm objects Account, Transaction and Item.
In brief:
The goal is to query the Item for all transactions where the transaction account number is 1
So as you can see we have a function in the item that should query for all transactions whose account property is an account where account_id = 1.
Sometimes the count is 1, sometimes 2, sometimes 3.
However, if we use a filter directly on the transactions, it outputs correctly
and will output 3 every time.
Code Sample
The two functions in the item class are just to for output testing. printTransactions prints the three transactions and the printFilteredResults should print the number of transactions that match the query.
Version of Realm and Tooling
Realm framework version: 5.0.0
Realm Object Server version: N/A
Xcode version: 11.3.1
iOS/OSX version: 10.14.x and 10.15.x
Dependency manager + version: N/A
The text was updated successfully, but these errors were encountered: