2
我有一個具有.localConcerts
提取屬性的藝術家對象(基本上是完整集合的一個子集,concerts
集合),我可以在我的NSFetchedResultsController謂詞中使用該屬性嗎?NSFetchedResultsController謂詞中的提取屬性
這裏就是我想:
NSFetchRequest *request = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Artist" inManagedObjectContext:context];
[request setEntity:entity];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"[email protected] > 0"];
[request setPredicate:predicate];
fetchedResultsController = [[NSFetchedResultsController alloc]
initWithFetchRequest:request
managedObjectContext:context
sectionNameKeyPath:nil
cacheName:nil];
但我發現了:
'keypath localConcerts not found in entity <NSSQLEntity Artist id=1>'
我缺少的東西,或只是不能使用內部謂詞獲取屬性?