Instance Method

awakeFromSnapshotEvents:

Provides an opportunity to add code into the life cycle of the managed object when it is being fulfilled from a snapshot.

Declaration

- (void)awakeFromSnapshotEvents:(NSSnapshotEventType)flags;

Parameters

flags

A bit mask of didChangeValueForKey: constants to denote the event or events that led to the method being invoked.

For possible values, see NSSnapshotEventType.

Discussion

You typically use this method to compute derived values or to recreate transient relationships from the receiver’s persistent properties.

If you want to set attribute values and need to avoid emitting key-value observation change notifications, you should use primitive accessor methods (either setPrimitiveValue:forKey: or—better—the appropriate custom primitive accessors). This ensures that the new values are treated as baseline values rather than being recorded as undoable changes for the properties in question.

See Also

Managing Change Events

contextShouldIgnoreUnmodeledPropertyChanges

A Boolean value that indicates whether instances of the class should be marked as having changes if an unmodeled property is changed.

- awakeFromFetch

Provides an opportunity to add code into the life cycle of the managed object when it is being fulfilled from a fault.

- awakeFromInsert

Provides an opportunity to add code into the life cycle of the managed object when it is initially created.

- changedValues

Returns a dictionary containing the keys and (old) values of persistent properties that have been changed since the last fetching or saving of the managed object.

- changedValuesForCurrentEvent

Returns a dictionary containing the keys and old values of persistent properties that have changed since the last posting of NSManagedObjectContextObjectsDidChangeNotification.

- committedValuesForKeys:

Returns a dictionary of the last fetched or saved values of the managed object for the properties specified by the given keys.

- prepareForDeletion

Provides an opportunity to add code into the life cycle of the managed object when it is about to be deleted.

- willSave

Provides an opportunity to add code into the life cycle of the managed object when it is about to be saved.

- didSave

Provides an opportunity to add code into the life cycle of the managed object after the managed object’s context completes a save operation.

- willTurnIntoFault

Provides an opportunity to add code into the life cycle of the managed object before it is converted to a fault.

- didTurnIntoFault

Provides an opportunity to add code into the life cycle of the managed object when it is turned into a fault.

+ fetchRequest

Returns a new fetch request initialized with the entity represented by this subclass.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software