I need your help,
I’m learning the coreData migration and I can’t access to the two models file inside my momd package.
I’ve done this :
In the init method for the two models:
urlModel2 =[[NSBundle mainBundle] URLForResource:@"DeptB" withExtension:@"mom"];
And in an other method :
NSManagedObjectModel* model2 = [[NSManagedObjectModel alloc] initWithContentsOfURL:[self urlModel2]];
I would like to have my two models in each NSManagedObjectModel to do a verification :
NSMappingModel *mappingModel =
[NSMappingModel inferredMappingModelForSourceModel:[self sourceModel]
destinationModel:[self destinationModel] error:outError];
you can found this at : http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/CoreDataVersioning/Articles/vmLightweightMigration.html
Thank’s in advance !
I found the solution :