The master data mapping model does not work with the correct hashes

So, I decided to create 2 entities of one of my entities.

To check, I created these two objects without any attribute or relationship.

If I use the infer mapping model, the main data fails and the application crashes. Reported here

If I create a mapping model, the kernel data also cannot be updated. I checked the master data log and it says that the data hashes of the object are correct. What could be wrong here?

 CoreData: annotation: Incompatible version schema for persistent store
 'file://localhost/Users/.../StoreContent/persistentStore'.
 store metadata = {
     NSPersistenceFrameworkVersion = 419;
     NSStoreModelVersionHashes =     {
         Chat = <05d870d5 8d51e966 51a6b121 56fd0eff 6a35760e 829245ce 38e82724 b511b400>;
         Contact = <7f14d6ac 1bf1035e 63208d38 c048c396 d6385a95 3c8aec0b 36fbb86f 293fdb4d>;
         Message = <45852277 e01bffe5 a83f71fe 09c20dba 838bb51c 411dc185 56ba4ff1 7b68ba3d>;
         User = <1400bc94 f742db62 91627ea5 883e54a8 104da454 a9a7b073 f1e827ad 26f7e7c8>;
     };
     NSStoreModelVersionHashesVersion = 3;
     NSStoreModelVersionIdentifiers =     (
         3July13
     );
     NSStoreType = SQLite;
     NSStoreUUID = "73F77A17-9720-4D0E-90DD-D07A0EAECB29";
     "_NSAutoVacuumLevel" = 2; } and current model versions = {
     Broadcast = <e2afd25a 758f8e8b 7a2e1f2d 03042e32 e5e23693 a4935257 04a8e9fb 535e2452>;
     Chat = <05d870d5 8d51e966 51a6b121 56fd0eff 6a35760e 829245ce 38e82724 b511b400>;
     Contact = <7f14d6ac 1bf1035e 63208d38 c048c396 d6385a95 3c8aec0b 36fbb86f 293fdb4d>;
     Group = <67fa7527 b68ea99d ee8e704f 30f20e48 58350963 73e29c19 8aea7604 dfac7d7c>;
     Message = <45852277 e01bffe5 a83f71fe 09c20dba 838bb51c 411dc185 56ba4ff1 7b68ba3d>;
     User = <1400bc94 f742db62 91627ea5 883e54a8 104da454 a9a7b073 f1e827ad 26f7e7c8>; } 
2013-07-04 10:25:53.678 JonglaIM[90118:22103]
 CoreData: annotation: (migration)   will attempt automatic schema
 migration 2013-07-04 10:25:55.209 x[90118:22103] CoreData:
 annotation: (migration) looking for mapping model with   source
 hashes:  {
     Chat = <05d870d5 8d51e966 51a6b121 56fd0eff 6a35760e 829245ce 38e82724 b511b400>;
     Contact = <7f14d6ac 1bf1035e 63208d38 c048c396 d6385a95 3c8aec0b 36fbb86f 293fdb4d>;
     Message = <45852277 e01bffe5 a83f71fe 09c20dba 838bb51c 411dc185 56ba4ff1 7b68ba3d>;
     User = <1400bc94 f742db62 91627ea5 883e54a8 104da454 a9a7b073 f1e827ad 26f7e7c8>; }  
destination hashes: {
     Broadcast = <e2afd25a 758f8e8b 7a2e1f2d 03042e32 e5e23693 a4935257 04a8e9fb 535e2452>;
     Chat = <05d870d5 8d51e966 51a6b121 56fd0eff 6a35760e 829245ce 38e82724 b511b400>;
     Contact = <7f14d6ac 1bf1035e 63208d38 c048c396 d6385a95 3c8aec0b 36fbb86f 293fdb4d>;
     Group = <67fa7527 b68ea99d ee8e704f 30f20e48 58350963 73e29c19 8aea7604 dfac7d7c>;
     Message = <45852277 e01bffe5 a83f71fe 09c20dba 838bb51c 411dc185 56ba4ff1 7b68ba3d>;
     User = <1400bc94 f742db62 91627ea5 883e54a8 104da454 a9a7b073 f1e827ad 26f7e7c8>; } 
 2013-07-04 10:25:55.214 x[90118:22103]
 CoreData: annotation: (migration) checking mapping model at path
file://localhost/Users/.../Model.cdm
 source hashes:  {(
     <1400bc94 f742db62 91627ea5 883e54a8 104da454 a9a7b073 f1e827ad 26f7e7c8>,
     <7f14d6ac 1bf1035e 63208d38 c048c396 d6385a95 3c8aec0b 36fbb86f 293fdb4d>,
     <05d870d5 8d51e966 51a6b121 56fd0eff 6a35760e 829245ce 38e82724 b511b400>,
     <45852277 e01bffe5 a83f71fe 09c20dba 838bb51c 411dc185 56ba4ff1 7b68ba3d> )}  
destination hashes: {(
     <e2afd25a 758f8e8b 7a2e1f2d 03042e32 e5e23693 a4935257 04a8e9fb 535e2452>,
     <1400bc94 f742db62 91627ea5 883e54a8 104da454 a9a7b073 f1e827ad 26f7e7c8>,
     <7f14d6ac 1bf1035e 63208d38 c048c396 d6385a95 3c8aec0b 36fbb86f 293fdb4d>,
     <67fa7527 b68ea99d ee8e704f 30f20e48 58350963 73e29c19 8aea7604 dfac7d7c>,
     <05d870d5 8d51e966 51a6b121 56fd0eff 6a35760e 829245ce 38e82724 b511b400>,
     <45852277 e01bffe5 a83f71fe 09c20dba 838bb51c 411dc185 56ba4ff1 7b68ba3d> )} 2013-07-04 10:25:55.215 x[90118:22103] CoreData:
 annotation: (migration) no suitable mapping model found
+1
source share
1 answer

The API for specifying the mapping model directly is NSMigrationManager:

- (BOOL)migrateStoreFromURL:(NSURL *)sourceURL 
    type:(NSString *)sStoreType 
    options:(NSDictionary *)sOptions 
    withMappingModel:(NSMappingModel *)mappings 
    toDestinationURL:(NSURL *)dURL 
    destinationType:(NSString *)dStoreType 
    destinationOptions:(NSDictionary *)dOptions 
    error:(NSError **)error; 

, , , API.

hash iOS 6 , , . - iOS 7, . .

, , , , .

, , .

+1

All Articles