Type Method

modelByMergingModels:forStoreMetadata:

Returns, for the version information in given metadata, a model merged from a given array of models.

Declaration

+ (NSManagedObjectModel *)modelByMergingModels:(NSArray<NSManagedObjectModel *> *)models forStoreMetadata:(NSDictionary<NSString *,id> *)metadata;

Parameters

models

An array of instances of NSManagedObjectModel.

metadata

A dictionary containing version information from the metadata for a persistent store.

Return Value

A merged model from models for the version information in metadata. If a model cannot be created to match the version information in metadata, returns nil.

Discussion

This is the companion method to mergedModelFromBundles:forStoreMetadata:.

See Also

Initializing a Model

- initWithContentsOfURL:

Initializes the managed object model using the model file at the specified URL.

- init

Initializes an empty managed object model.

+ mergedModelFromBundles:

Returns a model created by merging all the models found in given bundles.

+ mergedModelFromBundles:forStoreMetadata:

Returns a merged model from a specified array for the version information in provided metadata.

+ modelByMergingModels:

Creates a single model from an array of existing models.