From: Simon Elliott Date: Tue, 26 Jun 2007 19:19:08 +0000 (+0000) Subject: add_to returns inserted row in many_to_many relation X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=716c16a0d3c32306b35ac161a4e8db94dc18bf80;p=dbsrgits%2FDBIx-Class-Historic.git add_to returns inserted row in many_to_many relation --- diff --git a/lib/DBIx/Class/Relationship/ManyToMany.pm b/lib/DBIx/Class/Relationship/ManyToMany.pm index d8d50de..1cb16ca 100644 --- a/lib/DBIx/Class/Relationship/ManyToMany.pm +++ b/lib/DBIx/Class/Relationship/ManyToMany.pm @@ -62,6 +62,7 @@ sub many_to_many { $link->set_from_related($f_rel, $obj); $link->set_columns($link_vals); $link->insert(); + return $obj; }; *{"${class}::${set_meth}"} = sub {