Resolve problem reported by http://lists.scsys.co.uk/pipermail/dbix-class/2009-Decemb...
Peter Rabbitson [Fri, 8 Jan 2010 16:48:50 +0000 (16:48 +0000)]
lib/DBIx/Class/Row.pm
t/60core.t

index a6dcbeb..ac496f8 100644 (file)
@@ -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
index be22fa7..b1503ca 100644 (file)
@@ -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;
 }