I'm having trouble compounding NSPredicate with AND, although using OR works fine.
Imagine 2 entities, Doctor and Patient. Doctors can have many patients and patients many doctors. I want to find doctors that, say, have both person1 and person2 as patients. I expected this to work but it returns none.
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"ANY patients matches 'person1&&person2'"];
If I change && to ||, I get all doctors that have person1 or person2 as I'd expect.
Thanks in advance for your help.