fetch request for entity.attribute == @“somevalue”
How do I setup a fetch request to only pull the data from an entity's attribute with one particular value? This is the basic code I've used before. -(void)fetchResults { NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:self.entityDescription.name]; NSString *cacheName = [self.entityDescription.name stringByAppendingString:@"Cache"]; // predicate code if (self.predicate != nil) { [fetchRequest setPredicate:self.predicate]; } // end of predicate code NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES]; [fetchRequest