made update(\%hash) work on row as well as rs
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Row.pm
index bf4a526..f59532a 100644 (file)
@@ -96,6 +96,7 @@ UPDATE query to commit any changes to the object to the db if required.
 sub update {
   my ($self, $upd) = @_;
   $self->throw_exception( "Not in database" ) unless $self->in_storage;
+  $self->set_columns($upd) if $upd;
   my %to_update = $self->get_dirty_columns;
   return $self unless keys %to_update;
   my $ident_cond = $self->ident_condition;