[Bast-commits] r8253 - in DBIx-Class/0.08/trunk: lib/DBIx/Class t
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Fri Jan 8 16:48:51 GMT 2010
Author: ribasushi
Date: 2010-01-08 16:48:50 +0000 (Fri, 08 Jan 2010)
New Revision: 8253
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm
DBIx-Class/0.08/trunk/t/60core.t
Log:
Resolve problem reported by http://lists.scsys.co.uk/pipermail/dbix-class/2009-December/008699.html
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm 2010-01-08 14:52:46 UTC (rev 8252)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm 2010-01-08 16:48:50 UTC (rev 8253)
@@ -802,7 +802,7 @@
$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
Modified: DBIx-Class/0.08/trunk/t/60core.t
===================================================================
--- DBIx-Class/0.08/trunk/t/60core.t 2010-01-08 14:52:46 UTC (rev 8252)
+++ DBIx-Class/0.08/trunk/t/60core.t 2010-01-08 16:48:50 UTC (rev 8253)
@@ -109,10 +109,12 @@
{
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;
}
More information about the Bast-commits
mailing list