Scenery:
Do a query using CoreData looking for records with a city and state, and return only the 'name' and 'address' columns of the location.
I'm currently using the following query:
// Array to be returned
NSMutableArray* arrayRegistrosFiltrados = [[NSMutableArray alloc] init];
NSManagedObjectContext * context = [self managedObjectContext];
NSError* error;
'// Instancia objeto que irá fazer a requisiçao
NSFetchRequest* requisicao = [[NSFetchRequest alloc]initWithEntityName:entidadeEstacionamento];
NSPredicate* argumentosBusca = [NSPredicate predicateWithFormat:@"estado==%@ AND cidade==%@",estado,cidade];
[requisicao setPredicate:argumentosBusca];
NSArray*registrosTemp = [context executeFetchRequest:requisicao error:&error];'
But this way returns all the columns of the records found.