Class

NSEntityMigrationPolicy

A policy instance that customizes the migration process for an entity mapping.

Declaration

@interface NSEntityMigrationPolicy : NSObject

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.

Topics

Customizing Stages of the Mapping Life Cycle

- beginEntityMapping:manager:error:

Sets up state information before the start of a given entity mapping.

- createDestinationInstancesForSourceInstance:entityMapping:manager:error:

Creates the destination instance(s) for a given source instance.

- endInstanceCreationForEntityMapping:manager:error:

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

- createRelationshipsForDestinationInstance:entityMapping:manager:error:

Constructs the relationships between the newly-created destination instances.

- endRelationshipCreationForEntityMapping:manager:error:

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

- performCustomValidationForEntityMapping:manager:error:

Provides the option to perform custom validation on migrated objects during the validation stage of the entity migration policy.

- endEntityMapping:manager:error:

Performs cleanup at the end of the migration, from any phase of the mapping.

Constants

NSMigrationManagerKey

Key for the migration manager.

NSMigrationSourceObjectKey

Key for the source object.

NSMigrationDestinationObjectKey

Key for the destination object.

NSMigrationEntityMappingKey

Key for the entity mapping object.

NSMigrationPropertyMappingKey

Key for the property mapping object.

NSMigrationEntityPolicyKey

Key for the entity migration policy object.

Relationships

Inherits From

See Also

Entity Mapping

NSMigrationManager

A migration manager instance that performs a migration of data from one persistent store to another using a given mapping model.

NSMappingModel

A model instance that specifies how to map a model from a source to a destination managed object model.

NSEntityMapping

A mapping instance that specifies how to map an entity from a source to a destination managed object model.

NSEntityMappingType

Data type used for constants that specify types of entity mapping.

NSPropertyMapping

A mapping instance that specifies in a model how to map from a property in a source entity to a property in a destination entity.