Merge 'trunk' into 'DBIx-Class-current'
Daniel Westermann-Clark [Wed, 10 May 2006 17:00:11 +0000 (13:00 -0400)]
r8956@fortuna (orig r1603):  dwc | 2006-05-10 12:00:11 -0400
Row::update encapsulates this when passed a hashref; using set_columns bypasses deflation

Changes
lib/DBIx/Class/ResultSet.pm

diff --git a/Changes b/Changes
index bf29764..e94364d 100644 (file)
--- a/Changes
+++ b/Changes
@@ -17,6 +17,8 @@ Revision history for DBIx::Class
           ColumnCase is loaded
 
 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
index 7d18853..db58023 100644 (file)
@@ -1259,8 +1259,7 @@ sub update_or_create {
 
   my $row = $self->find($hash, $attrs);
   if (defined $row) {
-    $row->set_columns($hash);
-    $row->update;
+    $row->update($hash);
     return $row;
   }