I've found various ways including this to test for the existence of to many relationships. What I want to know though is how to test for the non-existence of a one way relationship. Here's what I've come up so far:
NSPredicate *p = [NSPredicate predicateWithFormat:@"category = nil AND (ANY %@ <= created_at) AND (ANY created_at <= %@)", date1, date2];
The previous code will raise this exception:
The left hand side for an ALL or ANY operator must be either an NSArray or an NSSet.
I'm not sure what's wrong here, I just want to fetch records with category nil.