Hi, I'm a first time Core Data user/learner for iPhone, I thought that [managedObjectContext save:$error]
was used to save changes to the Persistant Store.
But when I reload and call NSFetch, the objects are still there. Any ideas why?
for (int i ; i < [mutableFetchResults count];i++)
{
NSManagedObject *toDelete = [mutableFetchResults objectAtIndex:i];
[managedObjectContext toDelete];
// Update the array and table view.
[mutableFetchResults removeObjectAtIndex:i];
}
if (![managedObjectContext save:&error]) {
// Handle the error.
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
exit(-1); // Fail
}