From: Peter Rabbitson Date: Fri, 8 Jan 2010 16:48:50 +0000 (+0000) Subject: Resolve problem reported by http://lists.scsys.co.uk/pipermail/dbix-class/2009-Decemb... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b236052fbc08d0be8e4cfe767de6f8c729e9316d;p=dbsrgits%2FDBIx-Class-Historic.git Resolve problem reported by lists.scsys.co.uk/pipermail/dbix-class/2009-December/008699.html --- diff --git a/lib/DBIx/Class/Row.pm b/lib/DBIx/Class/Row.pm index a6dcbeb..ac496f8 100644 --- a/lib/DBIx/Class/Row.pm +++ b/lib/DBIx/Class/Row.pm @@ -802,7 +802,7 @@ sub set_column { $self->{_orig_ident} ||= $self->ident_condition; my $old_value = $self->get_column($column); - $self->store_column($column, $new_value); + $new_value = $self->store_column($column, $new_value); my $dirty; if (!$self->in_storage) { # no point tracking dirtyness on uninserted data diff --git a/t/60core.t b/t/60core.t index be22fa7..b1503ca 100644 --- a/t/60core.t +++ b/t/60core.t @@ -109,10 +109,12 @@ is($new_again->ID, 'DBICTest::Artist|artist|artistid=4', 'unique object id gener { ok(my $artist = $schema->resultset('Artist')->create({name => 'store_column test'})); is($artist->name, 'X store_column test'); # used to be 'X X store...' - + # call store_column even though the column doesn't seem to be dirty - ok($artist->update({name => 'X store_column test'})); + $artist->name($artist->name); is($artist->name, 'X X store_column test'); + ok($artist->is_column_changed('name'), 'changed column marked as dirty'); + $artist->delete; }