value(forKey:)
Returns the value for a given key.
Declaration
func value(forKey key: String) -> Any?Parameters
- key:
The name of a property.
Return Value
The value for the property named key. For an attribute, the return value is an instance of an attribute type supported by Core Data (see NSAttributeDescription); for a to-one relationship, the return value must be another cache node instance; for a to-many relationship, the return value must be an collection of the related cache nodes.
Discussion
The default implementation forwards the request to the propertyCache dictionary if key matches a property name of the entity for the cache node. If key does not represent a property, the standard value(forKey:) implementation is used.