-
Notifications
You must be signed in to change notification settings - Fork 168
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 null queries over links to an indexed property #4460
Conversation
Is that so? It kind of surprises me. If you have a query like |
This fix is only to make queries for null across links on indexed properties consistent with queries for null across links on non indexed properties. Additionally, it is only the optimized path that had a problem. Without this PR I agree it is surprising behaviour, but it I think changing it would be considered breaking behaviour. There may be a strong argument to change the behaviour (I don't know the historical reasons why it is this way), but a counter argument is that if you have many links it may be tedious to write queries which do check for null along the link path. Users would have to transform |
I think that Jørgen's interpretation is more intuitive. If we're concerned about the verbosity, we can introduce new syntax - |
We have tried to conform to NSPredicate perhaps that is the reason. @tgoyne do you know which behaviour Apple has chosen? |
In |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arguments accepted
This was introduced in #3432.
The optimization made there is correct except when searching for null because we consider a null link along the relationship path to the property to be a match.