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

  • Home
  • SEARCH
  • 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 8393207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:43:18+00:00 2026-06-09T19:43:18+00:00

I have an existing core data set and I want to add an entity

  • 0

I have an existing core data set and I want to add an entity to it. I’m a little confused over whether I can use lightweight migration after adding a new entity to transition existing users to the new model.

The current modal is (just showing entities):

Story 1toMany-> Sentences

I need:

Story 1toMany-> Sentences 1toMany-> Media

Can I use the lightweight migration tool to do this?

I’ve read in the documentation:

For Core Data to be able to generate an inferred mapping model,
changes must fit an obvious migration pattern, for example:

Simple addition of a new attribute Removal of an attribute A
non-optional attribute becoming optional An optional attribute
becoming non-optional, and defining a default value Renaming an entity
or property

But this question seems to suggest lightweight migration will still work with the addition of an entity. Since the new media entity is optional I can’t see how it would practically be a problem.

  • 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-09T19:43:20+00:00Added an answer on June 9, 2026 at 7:43 pm

    Check the core data video “Mastering core data” from wwdc 2010. They talk about migration for your specific case. Long story short: yes, you can use lightweight migration. Just pass the options dictionary when initializing the NSPersistentStoreCoordinator instance:

    NSDictionary *dictionary=[NSDictionary dictionaryWithObjects:@[ [NSNumber numberWithBool:YES], [NSNumber numberWithBool:YES]] forKeys:@[ NSMigratePersistentStoresAutomaticallyOption, NSInferMappingModelAutomaticallyOption]];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert an existing app to use core data. I've set up
I have an existing iPad application to which I've just added core data versioning.
I have a pre-existing project to which I've added Core Data models. I added
I'd like to add core data to an existing iPhone project, but I still
I have set up a simple core data schema, where item objects are added
I have an existing solr core which has data in it regarding info on
I have an existing application using Core Data on the iPhone. Occasionally there would
I have a simple entity called Store built in Xcode's data modeler for use
I have a parent-child Core Data relationship set up in my iPhone app. I
I have existing code that uses CMNewProfileSearch to find then iterate over the color

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.