MappingModel generate incorrect model hash for 'Preserve After Deletion' attributes

Today I've investigated migration error. According to my investigations model with preserving after deletion fields would get incorrect hash calculation. That's why custom mapping model would not applied.

In `-com.apple.CoreData.MigrationDebug 1` logs the next entry happens: 'CoreData: annotation: (migration) mismatched and destination hashes for mapping model MappingModel.cdm'.

My mapping model was regenerated several times on different machines to get rid of potential local issues.

Sample code: https://github.com/OdNairy/CloudKitError-FB6713955.git


Feedback ID: FB6713955

exact same issue here

ran into the same issue with Xcode 13.X

Is there /has there been any feedback from Apple side?

Has anybody discovered possible workarounds? The only thing I found is at runtime: to load the migration manually from file, and adjust the sourceEntityVersionHash and destinationEntityVersionHash of the loaded NSMappingModel.... but that's nothing that I really want to do.

MappingModel generate incorrect model hash for 'Preserve After Deletion' attributes
 
 
Q