不完全確定爲什麼這不起作用,我以爲它以前一直在工作。有沒有人看到這個FetchRequest構造的問題?NSPredicate'所有或任何運營商的左側必須是NSArray或NSSet'
- (NSArray *)entriesForDate:(NSDate *)date {
NSFetchRequest *request = [[NSFetchRequest alloc]initWithEntityName:@"Entry"];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"ANY addedOn.unique like %@", [T3Utility identifierForDate:date]];
request.predicate = predicate;
NSError *error = nil;
NSArray *matches = [self.database.managedObjectContext executeFetchRequest:request error:&error];
return matches;
}
再次,我99%肯定,該代碼已經工作直到最近,所以即時通訊心想也許還有別的東西在我的代碼的某個地方繼續。 。但是當我通過調試器運行它時,這是掛起的地方。這是我的錯誤:
左手邊爲ALL或ANY運算符必須是一個NSArray或NSSet中
任何想法?
謝謝!
你的實體的屬性和關係是什麼? –