Core Data Relationships and GUI Enhancement
1. Data Migration
When dealing with data migration, it will attempt a lightweight migration by inferring the mapping. If the mapping can’t be inferred, the process stops, and the method returns nil with an error. In such a case, the code [[NSApplication sharedApplication] presentError:error] will make the application show an error saying “The managed object model version used to open the persistent store is incompatible with the one that was used to create the persistent store.”
However, in this situation, there are two models available, and the mapping can be inferred. So, the lightweight migration is done automatically, with the old data file backed up first in case of issues.
超级会员免费看
订阅专栏 解锁全文
33

被折叠的 条评论
为什么被折叠?



