add_to returns inserted row in many_to_many relation
Simon Elliott [Tue, 26 Jun 2007 19:19:08 +0000 (19:19 +0000)]
lib/DBIx/Class/Relationship/ManyToMany.pm

index d8d50de..1cb16ca 100644 (file)
@@ -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 {