How to use the “IN” Operator with a Predicate
问题 How to write NSPredicate to fetch the rows that matches with values in the array? E.g: [NSPredicate predicateWithFormat:@"UserName IN %@",UserIDArray]; If UserIDArray contains ID of users, how does one fetch the user name which matches with the values in this array? 回答1: Let me start with this advice. Core Data is not SQL. Entities are not tables. Objects are not rows. Columns are not attributes/properties. Core Data is an object graph management system that may or may not persist the object