Instance Method

newValuesForObjectWithID:withContext:error:

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

Declaration

- (NSIncrementalStoreNode *)newValuesForObjectWithID:(NSManagedObjectID *)objectID withContext:(NSManagedObjectContext *)context error:(NSError * _Nullable *)error;

Parameters

objectID

The ID of the object for which values are requested.

context

The managed object context into which values will be returned.

error

If an error occurs, upon return contains an NSError object that describes the problem.

Return Value

An incremental store node encapsulating the persistent external values of the object with object ID objectID, or nil if the corresponding object cannot be found.

Discussion

The returned node should include all attributes values and may include to-one relationship values as instances of NSManagedObjectID.

If an object with object ID objectID cannot be found, the method should return nil and—if error is not NULL—create and return an appropriate error object in error.

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.

- 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.

- newObjectIDForEntity:referenceObject:

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

- referenceObjectForObjectID:

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