From: Oliver Gorwits Date: Mon, 26 Apr 2010 21:06:13 +0000 (+0000) Subject: change order for update processing to store new row data rather than previous row... X-Git-Tag: v0.900201~29 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f2188d3f55fc1375fd9784eba096c2da689eeea6;p=dbsrgits%2FDBIx-Class-Journal.git change order for update processing to store new row data rather than previous row data --- diff --git a/lib/DBIx/Class/Journal.pm b/lib/DBIx/Class/Journal.pm index 43ae0c7..1fcee49 100644 --- a/lib/DBIx/Class/Journal.pm +++ b/lib/DBIx/Class/Journal.pm @@ -8,7 +8,7 @@ use warnings; our $VERSION = '0.900001_04'; $VERSION = eval $VERSION; # no errors in dev versions -## On create/insert, add new entry to AuditLog +## On create/insert, add new entry to AuditLog and new content to AuditHistory sub _journal_schema { my $self = shift; @@ -17,11 +17,9 @@ sub _journal_schema { sub insert { my ($self, @args) = @_; - return if $self->in_storage; my $res = $self->next::method(@args); - $self->journal_log_insert; return $res; @@ -55,12 +53,12 @@ sub journal_log_delete { } } -## On update, copy previous row's contents to AuditHistory +## On update, copy row's new contents to AuditHistory sub update { my $self = shift; - $self->journal_log_update(@_); $self->next::method(@_); + $self->journal_log_update(@_); } sub journal_log_update {