Instance Method

setFetchRequestTemplate:forName:

Associates the specified fetch request with the receiver using the given name.

Declaration

- (void)setFetchRequestTemplate:(NSFetchRequest *)fetchRequestTemplate forName:(NSString *)name;

Parameters

fetchRequest

A fetch request, typically containing predicates with variables for substitution.

name

A string that specifies the name of the fetch request template.

Discussion

For more details on using this method, see Creating Predicates.

Special Considerations

This method raises an exception if the receiver has been used by an object graph manager.

See Also

Getting Fetch Request Templates

fetchRequestTemplatesByName

A dictionary of the receiver’s fetch request templates, keyed by name.

- fetchRequestTemplateForName:

Returns the fetch request with a specified name.

- fetchRequestFromTemplateWithName:substitutionVariables:

Returns a copy of the fetch request template with the variables substituted by values from the substitutions dictionary.