Core Data NSPredicate filter by entity class?
问题 How would I create an NSPredicate to filter by entity of class Contact ? The solution to NSPredicate check for kind of object class crashes: [NSPredicate predicateWithFormat:@"person.class == %@", [Contact class]]; *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'keypath person.class not found in entity <NSSQLEntity User id=12>' Background I have the Core Data entities User (app user) & Contact (address book contact), both children of Person (abstract