From: Matt S Trout Date: Mon, 9 Jul 2007 19:41:07 +0000 (+0000) Subject: many-many rel fix X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6cc5b3824863ed67f7f2c400b379099585d98b25;p=dbsrgits%2FDBIx-Class-Historic.git many-many rel fix --- diff --git a/Changes b/Changes index 69facca..c9c7bea 100644 --- 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 diff --git a/lib/DBIx/Class/Relationship/ManyToMany.pm b/lib/DBIx/Class/Relationship/ManyToMany.pm index 34c5e24..1e6b93b 100644 --- a/lib/DBIx/Class/Relationship/ManyToMany.pm +++ b/lib/DBIx/Class/Relationship/ManyToMany.pm @@ -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; };