views:

31

answers:

1

Hello,

I have a problem with my NSFetchRequest, it doesn't seem to be fetching any data, code below:

-(void)addAnnotations 
{       
    NSFetchRequest *request = [[NSFetchRequest alloc] init];

    NSEntityDescription *entity = [NSEntityDescription entityForName:@"WayPoint" inManagedObjectContext:managedObjectContext];
    [request setEntity:entity];

    //NSPredicate *predicate = [NSPredicate predicateWithFormat:@"waypoint_map_id=%i", 98];
    //[request setPredicate:predicate];

    NSError *error;
    listArray = [[managedObjectContext executeFetchRequest:request error:&error] mutableCopy];
    [request release];

    NSLog(@"Array: ", listArray);
}
A: 

Problem solved:

NSLog(@"Array: %d", listArray);
Stephen
You should use `%@` instead of `%d`. d is for ints, @ is for objects.
paxswill