Instance Method

sourceInstancesForEntityMappingNamed:destinationInstances:

Returns the managed object instances in the source store used to create the given destination instances for the passed in property mapping.

Declaration

- (NSArray<__kindof NSManagedObject *> *)sourceInstancesForEntityMappingNamed:(NSString *)mappingName destinationInstances:(NSArray<__kindof NSManagedObject *> *)destinationInstances;

Parameters

mappingName

The name of an entity mapping in use.

destinationInstances

A array of managed objects in the destination store.

Return Value

An array containing the managed object instances in the source store used to create destinationInstances using the entity mapping named mappingName. If destinationInstances is nil, all of the source instances used to create the destination instance for this property mapping are returned.

Discussion

This method throws an NSInvalidArgumentException exception if mappingName is not a valid mapping name.

See Also

Working with Source and Destination Instances

- associateSourceInstance:withDestinationInstance:forEntityMapping:

Associates a given source managed object instance with an array of destination instances for a given property mapping.

- destinationInstancesForEntityMappingNamed:sourceInstances:

Returns the managed object instances created in the destination store for the named entity mapping for the given array of source instances.