Hi,
I can easily log last modified date, modified by etc. However, I need old and new value to be logged too. In the interceptor, I can fire a select before postflush starts executing to get the value of the current record. Then I can run a diff between this record and the new one to see what changed and log that information as old and new values. So, say 25 parameters in my object changed. My audit trail will contain 25 rows minimum. Is there a better way?
The problem is my object to be modified can be really huge with references to other objects too. Doing a diff can be expensive. Plus the total number of queries executing is really a lot.
-thanks
|