mapping-model

Multiple Pass Core Data Migration In Chunks With iOS

本小妞迷上赌 提交于 2019-11-29 07:22:45
问题 I'm trying to migrate an iPhone/iPad sqlite store of about 11Mb. It has around thirty different entities, all quite heavily interrelated. On a 3GS, it takes quite some time. Even a lightweight migration takes around four minutes. I guess this is because all the relationships are held in memory. Reading the Apple migration guide, it says that for large datasets, one approach is to do multiple passes using different mapping models. All well and good. However, it seems that you can't do this if

Core Data migration problem: “Persistent store migration failed, missing source managed object model.”

巧了我就是萌 提交于 2019-11-29 04:19:59
The Background A Cocoa Non Document Core Data project with two Managed Object Models. Model 1 stays the same. Model 2 has changed, so I want to migrate the store. I've created a new version by Design > Data Model > Add Model Version in Xcode. The difference between versions is a single relationship that's been changed from to a one to many. I've made my changes to the model, then saved. I've made a new Mapping Model that has the old model as a source and new model as a destination. I've ensured all Mapping Models and Data Models and are being compiled and all are copied to the Resource folder

Core Data Migration Across Multiple Version Upgrades

丶灬走出姿态 提交于 2019-11-28 17:12:12
问题 I have an iPhone app that uses Core Data. I did an update and used Lightweight Migration to go from V1 to V2 of my MOM (Managed Object Model). This worked perfectly. What happens when I want to go to V3 (and beyond) of my MOM? If I decide to continue with Lightweight Migration, will it automatically deal with migrating from V1 to V3 and V2 to V3 of my MOM, or do I need to do something extra? If I decide to use a mapping model, what happens? How do I deal with upgrading both V1 and V2 MOM's to

I keep on getting “save operation failure” after any change on my XCode Data Model

我们两清 提交于 2019-11-28 03:42:59
I started using Core Data for iPhone development. I started out by creating a very simple entity (called Evaluation) with just one string property (called evaluationTopic). I had following code for inserting a fresh string: - (void)insertNewObject { // Create a new instance of the entity managed by the fetched results controller. NSManagedObjectContext *context = [fetchedResultsController managedObjectContext]; NSEntityDescription *entity = [[fetchedResultsController fetchRequest] entity]; NSManagedObject *newManagedObject = [NSEntityDescription insertNewObjectForEntityForName:[entity name]

Core Data migration problem: “Persistent store migration failed, missing source managed object model.”

假如想象 提交于 2019-11-27 18:16:32
问题 The Background A Cocoa Non Document Core Data project with two Managed Object Models. Model 1 stays the same. Model 2 has changed, so I want to migrate the store. I've created a new version by Design > Data Model > Add Model Version in Xcode. The difference between versions is a single relationship that's been changed from to a one to many. I've made my changes to the model, then saved. I've made a new Mapping Model that has the old model as a source and new model as a destination. I've