CoreData修改了数据模型报错 The model used to open the store is incompatible with the one used to create the store
在iOS 6 – Core Data 应用程序的开发过程中, App启动时出现如下异常信息:
reason = “The model used to open the store is incompatible with the one used to create the store”
出现上述异常的原因是 :我们修改了Data Model文件,增加了新的Entity,包括Attribute属性、Relationship关系等等。
解决办法:
(1) 最简单的办法是,在iOS 5 或者 6的模拟器中,删除App,然后重新运行就可以了。
(2) 第二种办法是使用Data Model 数据模型的版本属性:
给Data Model(也就是被管理对象模型)添加一个新的版本:
- 在项目导航栏中,选择Data Model 文件;
- 选择 Editor > Create Model Version 菜单项;
- 在对话框中,输入Data Model文件的名称,并点击Save按钮;

然后设置 Data Model的当前版本号:
- 在项目导航栏中,选择Data Model文件;
- 在File inspector 面板窗口,找到Versioned Core Data Model 节点;
- 从弹出菜单中,选择当前模板版本号;

CoreData修改了数据模型报错 The model used to open the store is incompatible with the one used to create the store的更多相关文章
- iOS/Xcode异常:reason = “The model used to open the store is incompatible with the one used to create the store”
reason=The model used to open the store is incompatible with the one used to create the store 出现上述异常 ...
- The model used to open the store is incompatible with the one used to create the store
说什么数据不兼容,,,,这时删除模拟器的应用,,,重新启动测试.
- location修改的时候报错解决办法
location修改的时候直接保存record,或者转换成DbObject都会报错,这样准换之后就好了if(key.equals("location")&&valu ...
- mysql5.7.18.1修改用户密码报错ERROR 1054 (42S22): Unknown column 'password' in 'field list'解决办法
本意向修改一个用户的密码,网上搜到的命令为如下 mysql> update user set password=password(“新密码”) where user=”用户名”; 执行后报错 E ...
- YII2修改backend模块报错An Error occurred while handling another error: exception 'yii\base\InvalidRouteException' with message 'Unable to resolve the request "site/error".' in E:\project\demo\vendor\yiisoft
报错内容: 原因:没有修改common/config/bootstrap.php里的别名 修改后:
- mysql 中modify和change区别(以及使用modify修改字段名称报错)
使用modify修改字段报错如下: mysql> alter table student modify name sname char(16);ERROR 1064 (42000): You h ...
- Oracle修改字段类型报错:“ORA-01439:要更改数据类型,则要修改的列必须为空”
在oracle修改user表字段name类型时遇到报错:“ORA-01439:要更改数据类型,则要修改的列必须为空”,是因为要修改字段的新类型和原来的类型不兼容. 如果要修改的字段数据为空时,则不会报 ...
- linux系统修改用户密码报错
版权声明:本文为博主原创文章,支持原创,转载请附上原文出处链接和本声明. 本文地址:https://www.cnblogs.com/wannengachao/p/12069113.html 1.设置新 ...
- django配置mysql报错 no model named "MySQLdb"
官网上面连接mysql数据库的参数很少,入了不少坑,一直排错和检查参数都没有问题,只能manage.py mirgrate 更新数据库的信息创建数据库的表. 很是郁闷.报了一大堆的错误,大概意思就是说 ...
随机推荐
- Drupal 7模板(主题钩子)的建议
这一块的内容很多其它的讲的是样例.所以这里请直接稳步官方站点查看吧.链接 https://drupal.org/node/1089656
- 中国vs美国制造业公司营业额大排名,看看哪些属于美国制造业的优势产业(中美旗鼓相当,而且还有本土制造的优势)
当然,所谓的美国制造业,大量的东西现在 在中国制造和生产,但这里列举的,主要是卖实体工业产品为主的美国公司这个榜单里主要列出以工业产品销售为主的公司. 所以各大能源巨头虽然本身也是装备制造大户,但没被 ...
- babel的安装和使用方法
要使用Babel, 我们需要nodeJS的环境和npm, 主要安装了nodeJS, npm就默认安装了 , 现在安装nodeJS很简单了, 直接下载安装就好了: 安装es-checker 在使用Bab ...
- iOS在一个label中显示不同颜色的字体
UILabel *Label = [[UILabel alloc] initWithFrame:CGRectMake(20, 300, 300, 30)]; NSMutableAttributedSt ...
- codeforces 399B. Red and Blue Balls 解题报告
题目链接:http://codeforces.com/problemset/problem/399/B 题目意思:给出 n 个只由 R 和 B 组成的字符串(由上到下排列,相当于栈),问最多可以操作多 ...
- silverlight 图片引入代码
private void comboBox2_SelectionChanged(object sender, SelectionChangedEventArgs e) { string str = t ...
- oracle自动统计信息
在11g中,默认自动收集统计信息的时间为晚上10点(周一到周五,4个小时),早上6点(周六,周日,20个小时), select a.window_name, a.repeat_interval,a ...
- 「LuoguP2014」 选课
Description 在大学里每个学生,为了达到一定的学分,必须从很多课程里选择一些课程来学习,在课程里有些课程必须在某些课程之前学习,如高等数学总是在其它课程之前学习.现在有N门功课,每门课有个学 ...
- VC链接hid.lib出错问题解决方案
写一个HID的客户端小程序,调用了一些HID API,但是链接时出现了奇怪的现象. 尽管我已经把头文件和lib文件加入到了VC的Include和Lib目录中,但不管我用VC链接,还是在DDK环境下链接 ...
- Hibernate中两种获取Session的方式
转自:https://www.jb51.net/article/130309.htm Session:是应用程序与数据库之间的一个会话,是hibernate运作的中心,持久层操作的基础.对象的生命周期 ...