核心数据映射模型版本哈希与源模型版本哈希不匹配

编程入门 行业动态 更新时间:2024-10-25 18:23:07
本文介绍了核心数据映射模型版本哈希与源模型版本哈希不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

启用核心数据迁移调试后,在执行迁移时,我看到三个实体(2、3、4)的哈希值已更改,正如预期的那样.实体 1 没有变化,仅供说明.

With Core Data Migration Debug enabled, when performing a migration I see three entities (2, 3, 4) with changed hashes, as expected. Entity 1 doesn't change and is for illustration.

存储元数据(源模型):

Store metadata (source model):

Entity1 = <67852e01 ...>; Entity2 = <2b68bba5 ...>; Entity3 = <58babd8d ...>; Entity4 = <1c694c80 ...>;

当前模型(目标模型):

Current model (destination model):

Entity1 = <67852e01 ...>; Entity2 = <260e4d68 ...>; Entity3 = <13360b6f ...>; Entity4 = <16513e1b ...>;

接下来,我创建了映射模型,但映射模型中的哈希值与实际模型中的哈希值不同:

Next, I create the mapping model, but the hashes in the mapping model are different than those in the actual models:

映射模型源哈希:

Entity1 = <67852e01 ...>; Entity2 = <2b68bba5 ...>; Entity3 = <d66bed18 ...>; // !!! Entity4 = <2c56997a ...>; // !!!

映射模型目标哈希:

Entity1 = <67852e01 ...>; Entity2 = <260e4d68 ...>; Entity3 = <cb08343c ...>; // !!! Entity4 = <1bc2cf8c ...>; // !!!

可以使用与实际商店的哈希值不同的哈希值创建映射模型的原因是什么?我看了这个问题并尝试更新映射模型的模型,但它不起作用.

What are the reasons the mapping model could be created with different hashes than the actual store's hashes? I looked at this question and tried updating the Mapping Model's models, but it didn't work.

推荐答案

最终奏效的解决方案是创建一个新模型版本,其中删除了这些实体,然后创建另一个新模型,重新引入实体.

The solution that finally worked was to create a new model version in which those entities were removed, then create another new model, with the entities re-introduced.

更多推荐

核心数据映射模型版本哈希与源模型版本哈希不匹配

本文发布于:2023-10-18 23:58:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1505806.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模型   版本   不匹配   核心   数据

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!