Yeah, we track changes at the object level (with no regards of how this affects the DB on commit), so the changes to "arcs" in the graph are attached to the corresponding owning objects. There's no easy way currently to pick at the list of changes, as the "diff API" is not public. I guess we may open some API to list the diffs, so that users could search and filter the changes to provide their apps with this important info. Something like:

GraphManager {

  GraphDiff getDiffs();
  GraphDiff getDiffs(ObjectId id);

}


Andrus


On Mar 24, 2009, at 12:16 PM, Andrey Razumovsky wrote:

Imagine you have Artist and Painting entities. You create a new Paining and attach it to existing Artist, then commit. The Artist object is marked as
modified, so LifecycleListeners will fire for it, but in fact nothing
changed in DB table (ARTIST). Is there any way to check if object has really changed? I suppose I could iterate through all attrs and simple to- one rels during lifecycle event, and compare values with cached snapshot of the CDO,
but this seems to be an ugly way..

Thanks,
Andrey

Reply via email to