4
Setting:
Query using Coredata for records with a city and state, and return only the columns 'name' and 'address' of the location.
I am currently using the following query:
// Array that will 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 found records.