One of the primary benefits of using Enterprise Objects is that it insulates you from database details. Once you define the mapping between the database and enterprise objects in a model, you generally do not need to think about issues such as key propagation and generation, how object deletions are handled, how operations in the object graph are reflected in the database, and so forth. The frameworks let you focus on object-oriented programming rather than on database programming.
You tell the frameworks what you want to do by performing operations on the object graph. So, it’s important that you understand a bit about how the object graph works and how to manage it. The object graph represents an internally consistent view of an application’s data. The operations you perform on it can affect its consistency, so knowing how to correctly work with it helps you build better applications that take full advantage of the frameworks.
This chapter discusses how to work with and manage the object graph. It tells you what you need to do in an application after data is fetched and before it is saved.
It is divided into the following sections:
“Objects Involved in Managing the Object Graph” introduces the objects involved in graph management.
“Getting Information About Changed Objects” describes how to get information about objects that have been changed in the object graph.
“Undoing Changes” discusses how to undo changes to enterprise objects.
“Discarding Changes” discusses how to discard changes to enterprise objects while maintaining their cached snapshots.
“Discarding Cached Objects” discusses how to discard changes to enterprise objects and how to discard their cached data.
“Refreshing Cached Data” discusses how to refresh the data in enterprise objects from fresh data in a data store.
“Working With Objects in Multiple Editing Contexts” describes how to work with the same object in multiple editing contexts.
“Memory Management” discusses memory management issues in the object graph.
Last updated: 2007-07-11