iPhone Core Data Lightweight Migration: Can't merge models

旧巷老猫 提交于 2019-11-29 08:20:43
westsider

You might try forcing Core Data to infer a mapping model:

NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil];

If the changes to your model were trivial, then Core Data may be able to infer a mapping model. If that fails, then you will probably need to create a mapping model (and revert to the options that you are currently using).

Mapping models are easy to create. Be mindful, though, if you change a data model then you will need to update the mapping, too.

You might want to check out this SO post.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!