Original values of an object
[prev]
[thread]
[next]
[Date index for 2005/03/11]
I'm writing a script that can either be run in updating mode or read only mode.
The script is performing some calculations and setting values into columns of an object. I am then either calling discard_changes or update on the object.
What I would really like to do is provide an audit trail of the changes - column name, old value and new value. I can work out which columns have changed from is_changed, but are the original values stored anywhere?
If not, I can add my own tracking functionality to the application - probably by subclassing Class::DBI, to store the extra information in the object.
Secondly, if you set a given column to the same value as it has already, does this count as a change?
Thanks,
Ivor.
|
Original values of an object
ivor.williams 10:29 on 11 Mar 2005
|