I have a managed object context to which I add two different SQLite stores. I use Configurations in an object-bound model of objects to assign specific objects to one store and other objects to another. The configurations are called "UserDB" and "MainDB".
Everything is working fine until I try to use automatic migration. After creating a new version of the managed object model and adding a new attribute to one of the objects in the UserDB configuration, I get an exception when adding the repository of the old version (for the repository associated with UserDB) to the store coordinator: "The model does not contain the 'UserDB' configuration. 'I I canβt find any hits for this error on Google. Anyone out there using several configuration stores? Does anyone have an idea what I can do wrong?
The stack is as follows:
objc_exception_throw -[NSManagedObjectModel isConfiguration:compatibleWithStoreMetadata:] -[NSStoreMigrationPolicy sourceModelForStoreAtURL:metadata:error:] -[NSStoreMigrationPolicy(InternalMethods) _gatherDataAndPerformMigration:] -[NSPersistentStoreCoordinator addPersistentStoreWithType:configuration:URL:options:error:] -[MyAppDelegate persistentStoreCoordinator]
+. , addPersistentStoreWithType. , .
, , . -, .
. , . , , .
, Blah.xcdatamodel Blah 2.xcdatamodel. Blah, Blah 2. (Git), Blah, Blah 2. . - , , , Blah.xcdatamodel , Blah.xcdatamodel , ( , , ), , , XCode. , , .
, , - , .
, , , , , , , , - , .