Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8914833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:49:36+00:00 2026-06-15T04:49:36+00:00

I added a new version of my data model and changed one attribute from

  • 0

I added a new version of my data model and changed one attribute from double to float.
Do I really have to create a migration mapping?

So now I’m stuck.

I found the Apple docs about migrating to new data models with NSMappingModels (and XCode 3), but I don’t know if it is really necessary if just the type of an attribute has changed.

After updating my app, I got that error msg from persistentStoreCoordinator:

Failed to open persistent store: Error Domain=NSCocoaErrorDomain Code=134130 “The operation couldn’t be completed.

Is there an easy way (howto/tutorial) to migrate, if only attribute types have changed? Deleting the app is no solution, the first version is already deployed.

Thanks,
Chris

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T04:49:37+00:00Added an answer on June 15, 2026 at 4:49 am

    According to lighweight migration rules, I don’t think you will be able to do this automatically. You will have to create an NSMappingModel, selecting both the old and new versions on it during creation. It will automatically create the migration for all your attributes and relationships, with the exception of the attribute you changed.

    For the model containing the attribute you will have to create a subclass of NSEntityMigrationPolicy and tell your NSMappingModel to use it (click the Entity in your NSMappingModel and in the inspector in the right side of your screen set it in the “Custom Policy” field. For that particular attribute create a method in your subclass of NSEntityMigrationPolicy and perform the casting there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have IIS 7.5 With one web site I added new virtual directory and
Hi I have a sqlite3 database full of data from my previous version of
So I created a new version of my data model, and made a previously
My storyboard seems locked. I have added new labels and imageviews to two different
I've released an app with a Core Data sqlite database. In the new version
I am using Core Data for my app and I have a model Reservation
I removed my .gitconfig by accident. I added new identies by git add [file]
This is my xml now. There can be added new item nodes and I
I added a new value (NULL_IS_NOT_NIL) to an enum in ksql.h enum { PKEY
I added a new file F1 and made changes to another file F2 but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.