How to check if an objects is inside of a NSSet of objects by using predicateWithFormat in CoreData?
问题 In my iPhone app, I try to have a TableViewController to display a list of photos those share one same tag (currentTag in code below). Photo and tag are "many to many" relationship in database. Each photo has an attribute named "tags", which type is NSSet. Each tag has an attribute named "photos", which type is NSSet, too. Tag has an attribute called "name". I'm trying to do the following code: NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"Photo"]; request.predicate =