I am having my core data model like this:
EntityA <—->> EntityB <<—-> EntityC
Now, I want to get objects of EntityB where EntityC == nil.
I have thought about a lot of options:
The one I tried is:
ANY EntityB.EntityC == nil
Though this does not give an error, it does not work how I expect, because this searches all objects of EntityA, and even if one is not nil, it takes that object of EntityA.
So what I tried is:
ALL Participant.ParticipantCategory == nil
but this gives an error:
Terminating app due to uncaught exception
‘NSInvalidArgumentException’, reason: ‘Unsupported predicate (null)
I also tried using SubQueries, but did not work out. I have spent hours trying to solve it but no luck.
Any ideas?
I think your predicate should be just:
Participant.ParticipantCategory == nilANYkeyword is described here. I think it is behaving as it should. And I’m not aware of anALLkeyword.