I think the best way to handle this is to subclass NSManagedObject, and then create a category to store what you want to add to the object. For example, several class methods for a unique and convenient creation:
+ (item *) findItemRelatedToOtherThing: (Thing *) existingThing inManagedObjectContext *) context {
item *foundItem = nil;
return foundItem;
}
+ (item *) itemWithOtherThing: (Thing *) existingThing inContext: (NSManagedObjectContext *) context {
item *theItem;
if( !(theItem = [self findItemRelatedToOtherThing: existingThing inManagedObjectContext: context]) ) {
NSLog( @"Creating a new item for Thing %@", existingThing );
theItem = [NSEntityDescription insertNewObjectForEntityForName: @"item" inManagedObjectContext: context];
theItem.whateverYouWant = existingThing.whateverItHas;
}
return theItem;
}
initWithEntity:insertIntoManagedObjectContext: , , :
item *newItem = [item itemWithOtherThing: oldThing inContext: currentContext];