CoreData迁移失败,没有合适的映射模型 [英] CoreData Migration Failing, No Suitable Mapping Model

查看:141
本文介绍了CoreData迁移失败,没有合适的映射模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试进行CoreData迁移,但突然停止工作。从调试日志:

I'm attempting to do a CoreData migration but it's suddenly stopped working. From the debug logs:

2013-04-12 11:59:17.600 Redacted[7684:3607] CoreData: annotation: (migration)    will attempt automatic schema migration
2013-04-12 11:59:17.712 Redacted[7684:3607] CoreData: annotation: (migration) looking for mapping model with 
 source hashes: 
{
    Redacted = <ad40b955 0fdcbf91 efd12f35 5ab2737a ad57635a 7b9bd32a a4aaecaf 6eb6ffb0>;
    Redacted = <8be6112c 2517affe 7496c522 c267a485 1b002285 057a735b d38e79c1 b2700406>;
    Redacted = <180e1207 9c41a970 bcd190bb 33b1d55e f4f6fe93 99167a2c c5b9aadd add4281e>;
    Redacted = <a55bab71 2e03c10f 6f59c567 64bd48c3 bed015c8 05ed9cbf a3253b44 02a9c783>;
}
 destination hashes: {
    Redacted = <45a621cd 1a04df96 ab756b9d 6f4e05ca 14790dd6 04dda71b e9d13894 6218a5d5>;
    Redacted = <4cdc3543 38cb3d0b f3edea4d 6f262f6e bff97ae0 cf8c9924 cdbacb3d b6fa7c8c>;
    Redacted = <ff7be1ae 0f120d47 cb2c39e1 33a24fff 1cb880b5 e5bd2ede 85470fea 2c77512a>;
    Redacted = <ca532228 da5b5471 1521b15c 203a8df2 da8e4639 4fb6b8fb 1510732a d538ab6a>;
    Redacted = <97e6c0c6 0eea0170 3870ca94 348d8ff8 437fc4ca ce8e11c1 1623ff07 5ea78ad4>;
    Redacted = <b48aabf8 4ac4b29c 77ae366d b941a441 23f909b1 81c7447e 44925268 c26e83df>;
}
2013-04-12 11:59:17.717 Redacted[7684:3607] CoreData: annotation: (migration) checking mapping model at path file://redacted/MappingModel.cdm
 source hashes: 
 {(
     <180e1207 9c41a970 bcd190bb 33b1d55e f4f6fe93 99167a2c c5b9aadd add4281e>,
     <ad40b955 0fdcbf91 efd12f35 5ab2737a ad57635a 7b9bd32a a4aaecaf 6eb6ffb0>,
     <a55bab71 2e03c10f 6f59c567 64bd48c3 bed015c8 05ed9cbf a3253b44 02a9c783>,
     <8be6112c 2517affe 7496c522 c267a485 1b002285 057a735b d38e79c1 b2700406>
 )}
 destination hashes: {(
    <ca532228 da5b5471 1521b15c 203a8df2 da8e4639 4fb6b8fb 1510732a d538ab6a>,
    <45a621cd 1a04df96 ab756b9d 6f4e05ca 14790dd6 04dda71b e9d13894 6218a5d5>,
    <4cdc3543 38cb3d0b f3edea4d 6f262f6e bff97ae0 cf8c9924 cdbacb3d b6fa7c8c>,
    <b48aabf8 4ac4b29c 77ae366d b941a441 23f909b1 81c7447e 44925268 c26e83df>,
    <97e6c0c6 0eea0170 3870ca94 348d8ff8 437fc4ca ce8e11c1 1623ff07 5ea78ad4>,
    <ff7be1ae 0f120d47 cb2c39e1 33a24fff 1cb880b5 e5bd2ede 85470fea 2c77512a>
)}
2013-04-12 11:59:18.440 Redacted[7684:3607] CoreData: annotation: (migration) no suitable mapping model found

据我所知,所有的哈希都匹配了。尝试清洁。任何想法为什么这是失败?

As far as I can tell, all the hashes are all matching up. Tried cleaning. Any ideas why this is failing?

推荐答案

回答我自己的问题:我有一个一对一的关系,0作为有效的最小值。

To answer my own question: There was a flaw in my schema. I had a one to one relationship with 0 as a valid minimum value.

我不知道是否有一个额外的日志记录标志设置,好。似乎奇怪的CoreData将暗示我的映射文件是坏的,当它是真正的我的模式。

I have no idea if there was an additional logging flag to set that would have highlighted that issue as well. Seems strange CoreData would imply my mapping file was bad when it was really my schema.

这篇关于CoreData迁移失败,没有合适的映射模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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