[Dbix-class] Getting old column values when overriding update?
jjn1056 at yahoo.com
Mon Dec 11 17:17:50 GMT 2006
--- Jess Robinson <castaway at desert-island.demon.co.uk>
> On Fri, 8 Dec 2006, John Napiorkowski wrote:
> > Hi,
> > I'm trying to move away from triggers for some
> > so that I can write code that has a chance of
> > on more than one database. However one thing I'm
> > having trouble emulating is how on most database
> > update triggers you can get the old values for the
> > updating row. Usually it's a syntax like
> > etc. However I don't see a simple way to do that
> > 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.
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
> Wiki: http://dbix-class.shadowcatsystems.co.uk/
> IRC: irc.perl.org#dbix-class
> Searchable Archive:
Want to start your own business?
Learn how on Yahoo! Small Business.
More information about the Dbix-class