core-data-migration

How to split an entity in Core Data migration mapping

It seems like this should be straight forward but I have not been able to find a good example of it. I have a simple Core Data entity that I want to split into two separate entities. Apple's documentation mentions it at a high level (Mapping Overview), however, it is unclear what the actual mapping model should look like to associate t...

Using mergedModelFromBundles: and versioning (CoreData)

Hi everybody, I'm trying to use the migration feature in CoreData. I've followed the Apple Documentation. I have a problem in the following method: /** Returns the managed object model for the application. If the model doesn't already exist, it is created by merging all of the models found in the application bundle. */ - (NSManagedO...

Core Data Migration - "Can't add source store" error

Hi, In my iPhone app I'm using Core Data and I've made changes to my data model that cannot be automatically migrated over (i.e. added new relationships). I added the data model version (Design -> Data Model -> Add Model Version) and applied my new data model changes to the new version 2. I then created a mapping object model and set t...

Core Data migration of to-one relationship to to-many relationship

I have a deployed app that samples measurements from sensors (e.g., Temp °C, Pressure kPa). The user can create Experiments and collect samples. Each sample is stored as a Run, such that there is a one-to-many relationship from Experiment to Run. In the interest of performance, Run has a to-one relationship with Data entity (which is whe...

Detecting a Lightweight Core Data Migration

I'm using Core Data's automatic lightweight migration successfully. However, when a particular entity gets created during a migration, I'd like to populate it with some data. Of course I could check if the entity is empty every time the application starts, but this seems inefficient when Core Data has a migration framework. Is it possib...

Out of memory when migrating models

I am migrating data from one model version to another in the iPhone, but the migration causes the device to run out of memory and crash. Not to mention it takes forever on the device. I use the default migration settings. I guess the bad guy is one of the tables that contain the order of 105 rows. This table has not changed though, but ...

Why Core data Needs? How to implement it?

Hi friends, What is the need of Core Data in iPhone development? What are the steps to implement it? What is mean by validating, migration in CoreData? Just explain simple... Thanks in Advance... ...

Migrating from Dictionary to Core Data Entity

I've got a data model where there is a Person entity, which has a transformable attribute which is an array of dictionaries containing information. The model is much bigger than that, this is just the part I'm having trouble with. It was designed this way by an old developer, and in taking over the project I need to migrate this to be 10...

Core Data lightweight migration: Can't find or automatically infer mapping model for migration

So I created a new version of my data model, and made a previously optional field non-optional (giving it a default value). According to the documentation, this should mean my migration is eligible for lightweight, automatic migration. I also added options that allow this when I open the store, also per the documentation: NSDictionary ...