Original values of an object

[prev] [thread] [next] [Date index for 2005/03/11]

From: ivor.williams
Subject: Original values of an object
Date: 10:29 on 11 Mar 2005
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

Re: Original values of an object
Tony Bowden 10:52 on 11 Mar 2005

Re: Original values of an object
Frank Carnovale 23:32 on 13 Mar 2005

Generated at 08:54 on 14 Mar 2005 by mariachi v0.52