iphone - Core Data Migration: Do I Need a new Mapping Model for each new Model Version I Add? -
i've done custom core data migration several versions when doing structure changes in app. (so created new model version, , mapping model custom policy class).
now, want more changes. i've created model version. now, i'm not sure whether need create mapping model change? if do, core data figure out appropriate 1 use based on users version?
will need create custom policy class, or can somehow add new logic first one?
lastly, need add logic migrating original database straight current database? or core data figure out me, , migrate median version first, , current version when user loads app version original data structure?
thanks!
i guess answer whether or not need create mapping model is... depends. see apple's docs here (specifically comments on lightweight migration): https://developer.apple.com/library/ios/documentation/cocoa/conceptual/coredataversioning/articles/vmmigrationprocess.html#//apple_ref/doc/uid/tp40004399-ch6-sw1
Comments
Post a Comment