X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FRelationship%2FManyToMany.pm;h=a99f7d545ebb989bc73db97d78e906ab494a045d;hb=ac36a402d195c291fc04a48332aaed7fdc5b19e0;hp=163ac365102e20451842a9ffbc26fb0334b3dfab;hpb=acdda5b21197d6fd849ef15e544b5fbae283649a;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Relationship/ManyToMany.pm b/lib/DBIx/Class/Relationship/ManyToMany.pm index 163ac36..a99f7d5 100644 --- a/lib/DBIx/Class/Relationship/ManyToMany.pm +++ b/lib/DBIx/Class/Relationship/ManyToMany.pm @@ -103,7 +103,7 @@ EOW ); my @to_set = (ref($_[0]) eq 'ARRAY' ? @{ $_[0] } : @_); $self->search_related($rel, {})->delete; - $self->$add_meth($_) for (@to_set); + $self->$add_meth($_, ref($_[1]) ? $_[1] : {}) for (@to_set); }; my $remove_meth_name = join '::', $class, $remove_meth;