setFetchRequestTemplate(_:forName:)
Associates the specified fetch request with the receiver using the given name.
Declaration
func setFetchRequestTemplate(_ fetchRequestTemplate: NSFetchRequest<any NSFetchRequestResult>?, forName name: String)Parameters
- fetchRequestTemplate:
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.