Class

NSEntityMigrationPolicy

Instances of NSEntityMigrationPolicy customize the migration process for an entity mapping.

Overview

You set the policy for an entity mapping by passing the name of the migration policy class as the argument to entityMigrationPolicyClassName (typically you specify the name in the Xcode mapping model editor).

Symbols

Customizing Stages of the Mapping Life Cycle

func begin(NSEntityMapping, with: NSMigrationManager)

Invoked by the migration manager at the start of a given entity mapping.

func endInstanceCreation(forMapping: NSEntityMapping, manager: NSMigrationManager)

Indicates the end of the creation stage for the specified entity mapping, and the precursor to the next migration stage.

func createRelationships(forDestination: NSManagedObject, in: NSEntityMapping, manager: NSMigrationManager)

Constructs the relationships between the newly-created destination instances.

func endRelationshipCreation(forMapping: NSEntityMapping, manager: NSMigrationManager)

Indicates the end of the relationship creation stage for the specified entity mapping.

func performCustomValidation(forMapping: NSEntityMapping, manager: NSMigrationManager)

Invoked during the validation stage of the entity migration policy, providing the option of performing custom validation on migrated objects.

func end(NSEntityMapping, manager: NSMigrationManager)

Invoked by the migration manager at the end of a given entity mapping.

Constants

Value Expression Keys

Keys used in value expression right hand sides.

Relationships

Inherits From

Conforms To