5

我正在尝试使用映射模型迁移核心数据存储,但出现此错误:“持久存储迁移失败,缺少映射模型。”

我的应用程序找到了映射模型,但没有使用它,即使哈希匹配。这是迁移调试日志:

2013-04-18 23:23:53.256 MyApp[30934:303] CoreData: annotation: Incompatible version schema for persistent store 'file://localhost/Users/Clemens/Library/Containers/com.my-company.MyApp/Data/Library/Application%20Support/com.my-company.MyApp/MyApp.storedata'.  store metadata = {
    NSPersistenceFrameworkVersion = 407;
    NSStoreModelVersionHashes =     {
        Project = <71e5190c 4e7bdecf 0fcc5df6 72120586 e6ec3b83 9aecd871 6847c9c1 4e888a06>;
        Task = <e7df7dad d3710c84 2cc82543 7ef549e2 a4fa5818 b243b97e 5a734d49 5c1ce19f>;
        WorkPeriod = <ed62858b 98bacd8d 70442733 07caae00 f82073d8 dd67fd68 c703778f 4b6c7c37>;
    };
    NSStoreModelVersionHashesVersion = 3;
    NSStoreModelVersionIdentifiers =     (
        ""
    );
    NSStoreType = XML;
    NSStoreUUID = "397108D9-D465-41E4-B5FA-45701DAC5B4D";
} and current model versions = {
    Project = <919c7227 b911a0f2 25df6d2a 2f939989 37e81707 b7dcacfd 4570d7e0 b965f75d>;
    Task = <b5a7c7a5 1efc83d7 a3dda24d 44251466 0552d7db 5beb1491 1048b48e f9032df2>;
    TaskPreset = <6f6ab28a c7a3e78f c6856bf8 b56b8efc f9d2ac0b 30b80356 86367d31 bf94b507>;
    TaskPresetGroup = <9b892cb1 2948fb51 cb25a8db 89515654 d55069b2 1081a669 2c56bb21 a9c7c156>;
    WorkPeriod = <5360e9c9 91d2c313 0a9ca2e1 b348b5c3 8176831e 7fc9748f d43623b1 364ecfb9>;
}
2013-04-18 23:23:53.257 MyApp[30934:303] CoreData: annotation: (migration)   will attempt automatic schema migration
2013-04-18 23:23:53.298 MyApp[30934:303] CoreData: annotation: (migration) looking for mapping model with 
 source hashes: 
{
    Project = <71e5190c 4e7bdecf 0fcc5df6 72120586 e6ec3b83 9aecd871 6847c9c1 4e888a06>;
    Task = <e7df7dad d3710c84 2cc82543 7ef549e2 a4fa5818 b243b97e 5a734d49 5c1ce19f>;
    WorkPeriod = <ed62858b 98bacd8d 70442733 07caae00 f82073d8 dd67fd68 c703778f 4b6c7c37>;
}
 destination hashes: {
    Project = <919c7227 b911a0f2 25df6d2a 2f939989 37e81707 b7dcacfd 4570d7e0 b965f75d>;
    Task = <b5a7c7a5 1efc83d7 a3dda24d 44251466 0552d7db 5beb1491 1048b48e f9032df2>;
    TaskPreset = <6f6ab28a c7a3e78f c6856bf8 b56b8efc f9d2ac0b 30b80356 86367d31 bf94b507>;
    TaskPresetGroup = <9b892cb1 2948fb51 cb25a8db 89515654 d55069b2 1081a669 2c56bb21 a9c7c156>;
    WorkPeriod = <5360e9c9 91d2c313 0a9ca2e1 b348b5c3 8176831e 7fc9748f d43623b1 364ecfb9>;
}
2013-04-18 23:23:53.300 MyApp[30934:303] CoreData: annotation: (migration) checking mapping model at path file://localhost/Users/Clemens/Library/Developer/Xcode/DerivedData/MyApp-fcaoexogoreuawfnznnkmnjtqwop/Build/Products/Debug/MyApp.app/Contents/Resources/MappingModel.cdm
 source hashes: 
{(
    <ed62858b 98bacd8d 70442733 07caae00 f82073d8 dd67fd68 c703778f 4b6c7c37>,
    <71e5190c 4e7bdecf 0fcc5df6 72120586 e6ec3b83 9aecd871 6847c9c1 4e888a06>,
    <e7df7dad d3710c84 2cc82543 7ef549e2 a4fa5818 b243b97e 5a734d49 5c1ce19f>
)}
 destination hashes: {(
    <9b892cb1 2948fb51 cb25a8db 89515654 d55069b2 1081a669 2c56bb21 a9c7c156>,
    <b5a7c7a5 1efc83d7 a3dda24d 44251466 0552d7db 5beb1491 1048b48e f9032df2>,
    <6f6ab28a c7a3e78f c6856bf8 b56b8efc f9d2ac0b 30b80356 86367d31 bf94b507>,
    <5360e9c9 91d2c313 0a9ca2e1 b348b5c3 8176831e 7fc9748f d43623b1 364ecfb9>,
    <919c7227 b911a0f2 25df6d2a 2f939989 37e81707 b7dcacfd 4570d7e0 b965f75d>
)}
2013-04-18 23:23:53.301 MyApp[30934:303] CoreData: annotation: (migration) no suitable mapping model found

我不知道,为什么我的映射模型不合适。有谁知道,我做错了什么?

4

0 回答 0