Hi,
all my previous changes in my data model where migrated with the automatic lightweight migration.
For my persistentStoreCoordinator I set the following options:
Code:
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption,
[NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption,
nil];
Now I made a change that can't be automatically (lightweight) migrated.
I created a mapping model with a own subclass of NSEntityMigrationPolicy. The migration with the mapping model works.
My Problem is:
I only defined the mapping for the changes that can't be migrated with the lightweight method. Now all other entities/tables are empty.
Do I have to define all mappings in the mapping model (also AtoA, BtoB etc.)?
Is it possible to only define the mappings for specific changes and let all other changes automatically be migrated through the lightweight migration?
Edit:
I figured out that the option "NSInferMappingModelAutomaticallyOption" shouldn't be set to YES to migrate with the mapping model.
Do I need this option for the lightweight migration or is "NSMigratePersistentStoresAutomaticallyOption= YES" enough?
I'm afrai that the lightweight migration doesn't work, when I create a next datamodel-version and only want to use the lightweight method (without mapping model).