Hi,
I am trying to save the delta's during session updates using interceptor. I need to be able to retrieve the db table names and the db fields in OnFlushdiry() callback method.
This interceptor and the auditing functionality has to be global ... i.e. can be plugged into any session with out any code changes.
Some of the issues with this approach
1. In my case, one class is associated to many (3) entity-names. Although all these entities refer to the same table, the fields in the each of them are not the same. During onFlushDiry, I cannot get the right entityname.. is there a way to get that ?
2.When collections are updated as part of the object, is the onflushdirty() method called separately for each object in the collection in addition to call for the parent object.
3. How do you handle many-to-one types..? Is there a way to retrieve the field getting updated in the parent object instead of the associated object ..?
thanks for your help...
|