You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Reece Garrett <RG...@co.pierce.wa.us> on 2008/07/23 22:31:23 UTC

Embedded class problems

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

Thanks,
-Reece