iOS Core Data how to properly initialize entity relationships?
I have a one to many relationship in my core data model. I need to create a new entity and save it. The entity has a one to many relationship which generated the following code: - (void)addRelationshipEvent1:(NSSet *)values; - (void)removeRelationshipEvent1:(NSSet *)values; . NSManagedObjectContext *context = [self.fetchedResultsController managedObjectContext]; NSEntityDescription *entity = [[self.fetchedResultsController fetchRequest] entity]; ApplicationRecord *newManagedObject = (ApplicationRecord*)[NSEntityDescription insertNewObjectForEntityForName:[entity name] inManagedObjectContext