这是fetchrequest的NSDictionnary结果:
{
"appelation_vin" = Bordeaux;
"id_dom" = 134;
"vin_domaine" = "0x5b33ce0 <x-coredata://41A4D74E-EF4D-41DA-96F9-7F15DAE46403/domaine/p134>";
},
这就是谜,vin_domaine假设是两个表之间的关系的值,所以我知道它假设的对象类型(domaine)但我不明白为什么它没有被core_data识别...
这是请求帮助
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
[fetchRequest setEntity:[NSEntityDescription entityForName:@"vin" inManagedObjectContext:managedObjectContext]];
[fetchRequest setReturnsObjectsAsFaults:NO];
[fetchRequest setResultType:NSDictionaryResultType];
[fetchRequest setReturnsDistinctResults:YES];
[fetchRequest setPropertiesToFetch:[NSArray arrayWithObjects:@"appelation_vin",@"id_dom",@"vin_domaine",nil]];
NSString *mysearch= [NSString stringWithFormat:@"appelation_vin= '%@'",appelation];
NSPredicate *predicate = [NSPredicate predicateWithFormat:mysearch,10];
[fetchRequest setPredicate:predicate];
[fetchRequest setRelationshipKeyPathsForPrefetching:[NSArray arrayWithObject:@"domaine"]];
寻求帮助!