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 727335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:33:21+00:00 2026-05-14T06:33:21+00:00

I have made a data model, and now I’ve made a 2nd version. All

  • 0

I have made a data model, and now I’ve made a 2nd version. All of the generated NSManagedObjects mapped to that data model are all version 1. Is there some way to update them to v2 without deleting them and then saying having them generated again?

  • 1 1 Answer
  • 2 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-05-14T06:33:22+00:00Added an answer on May 14, 2026 at 6:33 am

    If you have two versions of your model you need to either create a mapping model between the two versions or you need to turn on automatic migration if the changes are simple enough for Core Data to resolve.

    I would suggest reviewing Apple’s documentation on the subject of Core Data migration.

    update

    I’m using auto migration. But say I have a person entry in v1 that just is last name and first name. In v2 I added date of birth. After making the data model of v1 I told Xcode to generate the NSManaged objects (in this example Person.m) now I’ve made v2 model with auto migration set up. How do I update Person.m to add DOB without deleting and then adding it again, or adding DOB manually?

    The NSManagedObject will already have it in there, if you want to add the properties (as opposed to just the attributes) then just type in the two lines of code into your NSManagedObject subclass.

    update

    Other option, which I highly recommend, is to use mogenerator instead of the built-in code generator. mogenerator will keep the files up to date after model changes.

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

Sidebar

Related Questions

So... I have some little flash graphs I made that pull data from an
I have made a code that read data from flash Nand (without filesystem). fd
I have made a java application that stores data from a .csv file to
I have made Iphone applicatio. In my application whatever data i have recorded; all
In my iOS application I have made a form that should submit data into
I've made a helper, that should output some data from my database in the
I have an iPhone app that is using CoreData. I recently made some minor
I have made a jQuery toggle for a menu that I had in mind.
i have made an application having entity framewrok. It is wpf application, now it
I have an iphone app that uses Core Data to do storage. I have

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.