NSFetchedResultsController crashing on performFetch: when using a cache

I had a similar problem with one of my apps, when the Apple released the new iOS 4.0. Search: fetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:[self managedObjectContext] sectionNameKeyPath:nil cacheName:nil]; And set the value of the parameter cacheName to nil. It worked for me, hope it will for you. Let me know.

Is there a way to instantiate a NSManagedObject without inserting it?

For what it’s worth, Marcus Zarra seems to be promoting the nil context approach, claiming that it’s expensive to create a new context. For more details, see this answer to a similar question. Update I’m currently using the nil context approach and have encountered something that might be of interest to others. To create a … Read more

NSPredicate: filtering objects by day of NSDate property

Given a NSDate * startDate and endDate and a NSManagedObjectContext * moc: NSPredicate *predicate = [NSPredicate predicateWithFormat:@”(date >= %@) AND (date <= %@)”, startDate, endDate]; NSFetchRequest *request = [[[NSFetchRequest alloc] init] autorelease]; [request setEntity:[NSEntityDescription entityForName:@”EntityName” inManagedObjectContext:moc]]; [request setPredicate:predicate]; NSError *error = nil; NSArray *results = [moc executeFetchRequest:request error:&error];

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)