核心数据 - NSFetchRequest问题

时间:2010-07-21 15:10:44

标签: iphone core-data nsfetchrequest

我的NSFetchRequest有问题,它似乎没有获取任何数据,代码如下:

-(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);
}

1 个答案:

答案 0 :(得分:0)

问题解决了:

NSLog(@"Array: %d", listArray);