Search Core Data for all objects with an empty “to-many” relationship

Figured it out. Here’s what I did:

NSPredicate *predicate = [NSPredicate
                          predicateWithFormat:@"lists.@count == 0"];
[fetchRequest setPredicate:predicate];

Then when I ran the fetch request, it only brought up the patients with no list attached.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)