Instance Method

refresh()

Merges changes to this object with the latest saved values.

Declaration

func refresh() -> Bool

Return Value

If the operation is successful, true; if the object was deleted in the event store, false. If this method returns false, the object should be released.

Discussion

This method merges the local changes to properties of this object with the latest values in the event store. This method updates only properties that have not been modified locally, so you do not lose any changes by invoking this method. You can also use this method to see whether an object was deleted from the event store.

See Also

Saving and Restoring State

var hasChanges: Bool

Returns whether this object or any of the objects it contains has uncommitted changes.

isNew

Returns whether this object has ever been saved.

func reset()

Returns this object to its saved state.

func rollback()

Rolls back the property values of this object to its original state when it was first fetched.

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