编辑模型后缺少映射模型 [英] Missing Mapping Model after editing the model

查看:75
本文介绍了编辑模型后缺少映射模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在手动进行核心数据迁移,并且继续遇到可可错误134140:NSMigrationMissingMappingModelError.我注意到,只要我对模型进行任何更改,就会发生这种情况,即使是将属性标记为可选的小事情也是如此.到目前为止,发生这种情况时,我发现的唯一解决方案是删除我的映射模型并创建一个新的映射模型.有没有更好,更乏味的解决方案?

I'm in the process of a manual core data migration and keep running into Cocoa Error 134140: NSMigrationMissingMappingModelError. I've noticed this happens any time I make any change to the model, even something as small as marking a property as optional. So far, the only solution I've found when this happens is to delete my mapping model and create a new mapping model. Are there any better, less tedious solutions?

推荐答案

有一个菜单选项可以解决此问题.如果您在创建映射模型后随时更新模型,请执行以下操作:

There's a menu option to resolve this. If you update your model anytime after creating your mapping model just do the following:

  1. 选择映射模型.
  2. 选择编辑器->刷新数据模型.

这篇关于编辑模型后缺少映射模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆