Instance Method

valueForKey:

Returns the value for a given key.

Declaration

- (id)valueForKey:(NSString *)key;

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 valueForKey: implementation is used.

See Also

Managing Node Data

objectID

The managed object ID of the node.

propertyCache

The property cache dictionary of the node.

- setValue:forKey:

Sets the value for the given key.