Class

NSMappingModel

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

Declaration

class NSMappingModel : NSObject

Topics

Creating a Mapping

init?(from: [Bundle]?, forSourceModel: NSManagedObjectModel?, destinationModel: NSManagedObjectModel?)

Returns the mapping model that will translate data from the source to the destination model.

class func inferredMappingModel(forSourceModel: NSManagedObjectModel, destinationModel: NSManagedObjectModel) -> NSMappingModel

Returns a newly created mapping model that will migrate data from the source to the destination model.

init?(contentsOf: URL?)

Returns a mapping model initialized from a given URL.

Managing Entity Mappings

var entityMappings: [NSEntityMapping]!

The entity mappings for the mapping model.

var entityMappingsByName: [String : NSEntityMapping]

The entity mappings for the mapping model, keyed by name.

Relationships

Inherits From

Conforms To

See Also

Entity Mapping

class NSMigrationManager

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

class NSEntityMapping

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

class NSEntityMigrationPolicy

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

enum NSEntityMappingType

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

class 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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software