From: Matt S Trout Date: Wed, 15 Feb 2006 16:30:41 +0000 (+0000) Subject: made update(\%hash) work on row as well as rs X-Git-Tag: v0.06000~102 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fc27a8673e1a18b155da3619c93e992bf9ec676f;p=dbsrgits%2FDBIx-Class.git made update(\%hash) work on row as well as rs --- diff --git a/Changes b/Changes index cb501ac..29c2a69 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,6 @@ Revision history for DBIx::Class + - made update(\%hash) work on row as well as rs - another fix for count with scalar group_by - remove dependency on Module::Find in 40resultsetmanager.t (RT #17598) diff --git a/lib/DBIx/Class/Row.pm b/lib/DBIx/Class/Row.pm index bf4a526..f59532a 100644 --- a/lib/DBIx/Class/Row.pm +++ b/lib/DBIx/Class/Row.pm @@ -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;