= [[self.fetchedResultsController fetchRequest] entity]; NSManagedObject *newManagedObject = [NSEntityDescription insertNewObjectForEntityForName:[entity name] inManagedObjectContext:context]; // If appropriate, configure the new managed object. // Normally you should use accessor methods, but using KVC here avoids the need to add a custom class to the template. [newManagedObject setValue:[NSDate date] forKey:@"timeStamp"]; // Save the context. NSError *error = nil; if (![context save:&error]) { // Replace this implementation with code to handle the error appropriately. // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } } Saturday, September 21, 13
you can still save context on `-applicationWillTerminate:` • - all the important ObjectiveRecord methods have a counterpart with `NSManagedObjectContext` parameter • - ObjectiveRecord supports writing your own NSPredicates as well • - unlike MagicalRecord, does not create NSManagedObjectContexts for you • - unlike MagicalRecord, it doesn't use mr_prefixes. (you can go beat me later about that) • - it's lightweight Saturday, September 21, 13