Instance Method

newObjectIDForEntity:referenceObject:

Returns a new object ID that uses given data as the key.

Declaration

- (NSManagedObjectID *)newObjectIDForEntity:(NSEntityDescription *)entity referenceObject:(id)data;

Parameters

entity

The entity for the new object ID.

data

An object of type NSString or NSNumber to use as the key.

Return Value

A new object ID for an instance of the entity specified by entity and that uses data as the key.

Discussion

You should not override this method.

See Also

Manipulating Managed Objects

- executeRequest:withContext:error:

Returns a value as appropriate for the given request, or nil if the request cannot be completed.

- newValuesForObjectWithID:withContext:error:

Returns an incremental store node encapsulating the persistent external values of the object with a given object ID.

- newValueForRelationship:forObjectWithID:withContext:error:

Returns the relationship for the given relationship of the object with a given object ID.

- obtainPermanentIDsForObjects:error:

Returns an array containing the object IDs for a given array of newly-inserted objects.

- referenceObjectForObjectID:

Returns the reference data used to construct a given object ID.