--- Jess Robinson <[EMAIL PROTECTED]> wrote: > > > 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
Thanks, that worked quite well for me. It's not going to be easy to push myself away from stored procedures (I started as a pl/sql developer) but this way makes it easier on my DBA. --john > > > _______________________________________________ > 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]/ > ____________________________________________________________________________________ Want to start your own business? Learn how on Yahoo! Small Business. http://smallbusiness.yahoo.com/r-index _______________________________________________ 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]/
