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 更新数据库的信息创建数据库的表. 很是郁闷.报了一大堆的错误,大概意思就是说 ...
随机推荐
- WPF数据验证(5)―― 错误模板
<Style TargetType="{x:Type TextBox}"> <Setter Property="Validatio ...
- 设计模式学习笔记——Mediator中介者模式
将众多对象之间的网状关系转为全部通过一个中间对象间接发生关系,此中间对象为中介者. 看图最直观: 作用不言而喻,就是降低对象之间的耦合度,乃至降低了整个系统的复杂度. 有点象代理模式,更象外观模式:
- Codeforces Beta Round #25 (Div. 2 Only)D. Roads not only in Berland
D. Roads not only in Berland time limit per test 2 seconds memory limit per test 256 megabytes input ...
- 微信公众号菜单与应用交互session
http://www.cnblogs.com/yank/p/3476874.html http://blog.csdn.net/zmhawk/article/details/43671195 http ...
- 详解likely和unlikely函数【转】
本文转载自:http://blog.csdn.net/npy_lp/article/details/7175517 内核源码:Linux-2.6.38.8.tar.bz2 参考文档:http://gc ...
- linux初级学习笔记九:linux I/O管理,重定向及管道!(视频序号:04_3)
本节学习的命令:tr,tee,wc 本节学习的技能: 计算机的组成 I/O管理及重定向 管道的使用 知识点九:管理及IO重定向(4_3) 计算机组成: 运算器.控制器: CPU 存储器:RAM ...
- MySQL性能优化-I/O相关配置参数
本文介绍InnoDB和MyISAM两种存储引擎的I/O相关参数配置. 1.InnoDB I/O相关配置 Innodb是一种事务型的存储引擎,为了减少提交事务时产生的io开销,innodb采用了写日志 ...
- I.MX6 U-boot imxotp MAC address 写入
/***************************************************************************** * I.MX6 U-boot imxotp ...
- POJ2689:Prime Distance(大数区间素数筛)
The branch of mathematics called number theory is about properties of numbers. One of the areas that ...
- 「LuoguP4779」 【模板】单源最短路径(标准版)
Description 2018 年 7 月 19 日,某位同学在 NOI Day 1 T1 归程 一题里非常熟练地使用了一个广为人知的算法求最短路. 然后呢? 100→60: Ag→Cu: 最终,他 ...