My app uses CoreData
framework and I want to check compatibility between a store metadata and a managed object model. I do it standard way:
BOOL isModelCompatible = [model isConfiguration:nil
compatibleWithStoreMetadata:metadata];
and it returns NO
. However the entities in the metadata are the same as in the model. The same number of entities and each entity has the same name. However the model indeed has changed since the time the store was created using this model, I removed a couple of attributes in one entity. And I'm wondering if that is enough for a model to become incompatible with the store metadata. I took a look into the official documentation and it says:
This method compares the version information in the store metadata with the entity versions of a given configuration
And the problem (as it often happens when I read Apple's docs) is that I'm not quite sure what exactly this phrase means. So can anyone explain more regarding that topic? How CoreData
decides if a model is compatible or not to a metadata given that enteties in the metadata are the same as in the model?