From: Daniel Westermann-Clark Date: Wed, 10 May 2006 16:00:11 +0000 (+0000) Subject: Row::update encapsulates this when passed a hashref; using set_columns bypasses deflation X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d3c946a0d9e35fa3ace7d044429c44fe550df6c9;p=dbsrgits%2FDBIx-Class-Historic.git Row::update encapsulates this when passed a hashref; using set_columns bypasses deflation --- diff --git a/Changes b/Changes index 21968ef..c5716e7 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ Revision history for DBIx::Class 0.06003 + - don't set_columns explicitly in update_or_create; instead use + update($hashref) so InflateColumn works - fix for has_many prefetch with 0 related rows - make limit error if rows => 0 - added memory cycle tests and a long-needed weaken call diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 8089056..3efbf00 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -1159,8 +1159,7 @@ sub update_or_create { if (@unique_hashes) { my $row = $self->single(\@unique_hashes); if (defined $row) { - $row->set_columns($hash); - $row->update; + $row->update($hash); return $row; } }