openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reece Garrett" <>
Subject Embedded class problems
Date Wed, 23 Jul 2008 20:31:23 GMT
Hello everyone,

I am trying to implement audit logging using lifecycle callbacks. In my PostUpdate callback
method I extract the StateManager from the PersistenceCapable object I'm passed and from there
I iterate through the fields using the dirty BitSet from the StateManager. I log the field's
old value (extracted using the fetchInitialField method) and the fields new value (using the
fetchField method) along with some other metadata about the database columns, table, etc...

As I am iterating through the dirty fields if I come accross an Embedded PersistanceCapable
object I try to recursively process it. I am able to extract the StateManager from the Embedded
instance but the dirty BitSet indicates that all the fields are dirty even though I've only
manipulated a few of them. Also, I am not able to get the initial values using the fetchInitialField
method because the SaveFieldManager of the StateManager is null. I'm about out of ideas. Any
help is much appreciated


View raw message