projects
/
dbsrgits/DBIx-Class.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Support default aliases in many_to_many accessors. Update where test classes to use...
[dbsrgits/DBIx-Class.git]
/
lib
/
DBIx
/
Class
/
Relationship
/
ManyToMany.pm
diff --git
a/lib/DBIx/Class/Relationship/ManyToMany.pm
b/lib/DBIx/Class/Relationship/ManyToMany.pm
index
ea004e3
..
65eab45
100644
(file)
--- a/
lib/DBIx/Class/Relationship/ManyToMany.pm
+++ b/
lib/DBIx/Class/Relationship/ManyToMany.pm
@@
-14,6
+14,8
@@
sub many_to_many {
my $remove_meth = "remove_from_${meth}";
my $set_meth = "set_${meth}";
+ $rel_attrs->{alias} ||= $f_rel;
+
*{"${class}::${meth}"} = sub {
my $self = shift;
my $attrs = @_ > 1 && ref $_[$#_] eq 'HASH' ? pop(@_) : {};