You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I do lightWeight I get the error: NSSQLiteErrorDomain" - code: 1
Is there any workaround with this?
if ([[options objectForKey:NSMigratePersistentStoresAutomaticallyOption] boolValue] &&
[[options objectForKey:NSInferMappingModelAutomaticallyOption] boolValue]) {
NSMutableArray *bundles = [NSMutableArray array];
[bundles addObjectsFromArray:[NSBundle allBundles]];
NSManagedObjectModel *oldModel = [NSManagedObjectModel
mergedModelFromBundles:bundles
forStoreMetadata:metadata];
NSManagedObjectModel *newModel = [[self persistentStoreCoordinator] managedObjectModel];
if (oldModel && newModel) {
if (![oldModel isEqual:newModel]) {
// run migrations
if (![self migrateFromModel:oldModel toModel:newModel error:error]) {
return NO;
}
if I add [bundles addObjectsFromArray:[NSBundle allFrameworks]]; I get the value of oldModel nil.
instead adding only [bundles addObjectsFromArray:[NSBundle allBundles]]; it gives error when doing migrateFromModel : NSSQLiteErrorDomain" - code: 1.
The text was updated successfully, but these errors were encountered:
When I do lightWeight I get the error: NSSQLiteErrorDomain" - code: 1
Is there any workaround with this?
if I add
[bundles addObjectsFromArray:[NSBundle allFrameworks]];
I get the value of oldModel nil.instead adding only
[bundles addObjectsFromArray:[NSBundle allBundles]];
it gives error when doing migrateFromModel : NSSQLiteErrorDomain" - code: 1.The text was updated successfully, but these errors were encountered: