On Fri, 8 Dec 2006, John Napiorkowski wrote:

Hi,

I'm trying to move away from triggers for some things
so that I can write code that has a chance of running
on more than one database.  However one thing I'm
having trouble emulating is how on most database with
update triggers you can get the old values for the
updating row.  Usually it's a syntax like OLD.name,
etc.  However I don't see a simple way to do that when
I override the update method in my DBIx::Class
packages.  Does anyone know if this something I'll
need to burn another query on, or am I just not
reading the documentation correctly?

The old values aren't stored when you change them on your objects. Instead of using a query though, I suggest you override store_column and keep track of the previous values yourself.

Jess


_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to