I just used nearly the same technique here: EPPZQueuedObject.h
Although, I think mutate the entity architecture during runtime could lead to incompatiblity issues (an exception actually), when the stored SQLite data won't fit for your initial entities at startup.
So this generic object EPPZQueuedObject is an object of two attributes at all, so I had no intention to use a separate model file only for this purpose. But this structure is not mutating during runtime.
@implementation EPPZQueuedObject
@dynamic creationDate;
@dynamic archivedObject;
+(NSEntityDescription*)entityDescription
{
//Describe EPPZQueuedObject.
NSEntityDescription *entityDescription = [NSEntityDescription new];
entityDescription.name = EPPZQueuedObjectEntityName;
entityDescription.managedObjectClassName = NSStringFromClass(self);
//Describe creationDate.
NSAttributeDescription *creationDateDescription = [NSAttributeDescription new];
creationDateDescription.name = @"creationDate";
creationDateDescription.attributeType = NSDateAttributeType;
creationDateDescription.attributeValueClassName = @"NSDate";
creationDateDescription.defaultValue = nil;
//Describe archivedObject.
NSAttributeDescription *archivedObjectDescription = [NSAttributeDescription new];
archivedObjectDescription.name = @"archivedObject";
archivedObjectDescription.attributeType = NSBinaryDataAttributeType;
archivedObjectDescription.attributeValueClassName = @"NSData";
archivedObjectDescription.defaultValue = nil;
//Add attributes.
entityDescription.properties = @[ creationDateDescription, archivedObjectDescription ];
//Voila.
return entityDescription;
}
@end
More details in the corresponding article: http://eppz.eu/blog/simple-core-data-sample/