Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 8. Migration and Versioning > Custom Entity Migration Policies

Custom Entity Migration Policies

When Core Data migrates data between model versions, it uses a series of different objects to handle entity and property mappings. One of these objects is an NSEntityMigrationPolicy object.

An entity migration policy object determines how a source entity will be migrated to a destination entity; in order to derive and set the yearOfBirth attribute, you’ll need to specify a custom subclass of NSEntityMigrationPolicy for the Person entity to define the custom behavior.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial