Mac Developer Library

Developer

CoreData Framework Reference NSEntityMigrationPolicy Class Reference

Options
Deployment Target:

On This Page
Language:

NSEntityMigrationPolicy

Inheritance


Conforms To


Import Statement


Swift

import CoreData

Objective-C

@import CoreData;

Availability


Available in OS X v10.5 and later.

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

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

  • Keys used in value expression right hand sides.

    Declaration

    Swift

    let NSMigrationManagerKey: String let NSMigrationSourceObjectKey: String let NSMigrationDestinationObjectKey: String let NSMigrationEntityMappingKey: String let NSMigrationPropertyMappingKey: String let NSMigrationEntityPolicyKey: String

    Objective-C

    NSString *NSMigrationManagerKey; NSString *NSMigrationSourceObjectKey; NSString *NSMigrationDestinationObjectKey; NSString *NSMigrationEntityMappingKey; NSString *NSMigrationPropertyMappingKey; NSString *NSMigrationEntityPolicyKey;

    Constants

    • NSMigrationManagerKey

      NSMigrationManagerKey

      Key for the migration manager.

      To access this key in a custom value expression string in the Xcode mapping model editor use $manager.

      Available in OS X v10.5 and later.

    • NSMigrationSourceObjectKey

      NSMigrationSourceObjectKey

      Key for the source object.

      To access this key in a custom value expression string in the Xcode mapping model editor use $source.

      Available in OS X v10.5 and later.

    • NSMigrationDestinationObjectKey

      NSMigrationDestinationObjectKey

      Key for the destination object.

      To access this key in a custom value expression string in the Xcode mapping model editor use $destination.

      Available in OS X v10.5 and later.

    • NSMigrationEntityMappingKey

      NSMigrationEntityMappingKey

      Key for the entity mapping object.

      To access this key in a custom value expression string in the Xcode mapping model editor use $entityMapping.

      Available in OS X v10.5 and later.

    • NSMigrationPropertyMappingKey

      NSMigrationPropertyMappingKey

      Key for the property mapping object.

      To access this key in a custom value expression string in the Xcode mapping model editor use $propertyMapping.

      Available in OS X v10.5 and later.

    • NSMigrationEntityPolicyKey

      NSMigrationEntityPolicyKey

      Key for the entity migration policy object.

      To access this key in a custom value expression string in the Xcode mapping model editor use $entityPolicy.

      Available in OS X v10.5 and later.

    Discussion

    You can use these keys in the right hand sides of a value expression.