On 12/20/05, Cris Daniluk <cris.danilu..mail.com> wrote:
> Seems nice, though it does expose a many more methods on what is
> already a fairly exposed API.
True, but if it's useful to get newObjects, modifiedObjects, and
deletedObjects, it should be equally useful to get flattenedObjects
(it's certainly useful to me).
The RelationshipUpdate methods had to be exposed.
FlattenedRelationshipUpdate.getJoinEntity() and buildJoinSnapshot()
were exactly what I needed in my own code, and it didn't make sense to
recreate them.
> Anyway, for the dep pk issue, couldn't you add an OperationObserver to
> backfill that information?
I was wondering the same thing myself after I sent the message. I
think the majority of my auditing code has to run before commitChanges
(since it creates a bunch of new ChangeLog records). However, it's
probably possible to update the contents of those records.
I'll have to investigate that further. Part of the problem is that
the information I need has to be mangled and put into a general text
field (ie, "pk1 = x and pk2 = y") and figuring out the correct
ChangeLog records to update with that backfilled x and y value won't
be easy. I suppose I could create a HashMap of flattened
relationship objects and new dataObjects as keys, and then add a list
of ChangeLog records as the value.
This archive was generated by hypermail 2.0.0 : Wed Dec 21 2005 - 17:39:34 EST