many-many rel fix
Matt S Trout [Mon, 9 Jul 2007 19:41:07 +0000 (19:41 +0000)]
Changes
lib/DBIx/Class/Relationship/ManyToMany.pm

diff --git a/Changes b/Changes
index 69facca..c9c7bea 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,6 @@
 Revision history for DBIx::Class
 
+        - fix many-many rels to not use set_columns
         - Unmarked deploy as experimental since it isn't anymore
         - Removed Cwd dep since it's not required and causes problems
           with debian packaging
index 34c5e24..1e6b93b 100644 (file)
@@ -66,9 +66,8 @@ sub many_to_many {
       }
 
       my $link_vals = @_ > 1 && ref $_[$#_] eq 'HASH' ? pop(@_) : {};
-      my $link = $self->search_related($rel)->new_result({});
+      my $link = $self->search_related($rel)->new_result($link_vals);
       $link->set_from_related($f_rel, $obj);
-      $link->set_columns($link_vals);
       $link->insert();
          return $obj;
     };