3
votes

I created a new core data model version. The changes I made were I added a new entity called "FTASyncParent" which I set as an abstract entity. Then I set the parent entity of all my other entities to the abstract "FTASyncParent" entity. So now in my new model all my entities have the "FTASyncParent" entity set as the parent entity.

As I understood from Apple's core data documentation lightweight migration works for changes to the entity hierarchy. However when I try to perform the lightweight migration I get the following error.

Error: Error Domain=NSCocoaErrorDomain Code=134110 "The operation couldn’t be completed. (Cocoa error 134110.)" UserInfo=0x1d9ccba0 {destinationRootEntity=FTASyncParent, reason=Cannot merge multiple root entity source tables into one destination entity root table, sourceRootEntities=(
    Day,
    MealItemFood
), NSUnderlyingException=Cannot merge multiple root entity source tables into one destination entity root table}

Day and MealItemFood are some of the entities in my data model that now have the "FTASyncParent" entity as a parent.

How can I fix this error? If I can't use lightweight migration for this how should a custom mapping model map reflect the change in my data model?

1
There are more detailed instructions to solve this problem at stackoverflow.com/q/8250975user3819283

1 Answers

0
votes

Try deleting the app in the home screen of the emulator, and then rebuild/clean.