X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FRelationship%2FManyToMany.pm;h=a0edd92b1878661eeec23ed5655f3493c2cb0f03;hb=d2d82857c6643eee65dd3642f0109c064766c90a;hp=bab7bb1337f491de44f5ade1c39ae029df82fe3f;hpb=577ef680ceebff618b85a41dec6177074f51b76c;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Relationship/ManyToMany.pm b/lib/DBIx/Class/Relationship/ManyToMany.pm index bab7bb1..a0edd92 100644 --- a/lib/DBIx/Class/Relationship/ManyToMany.pm +++ b/lib/DBIx/Class/Relationship/ManyToMany.pm @@ -107,7 +107,7 @@ EOW "{$set_meth} needs a list of objects or hashrefs" ); my @to_set = (ref($_[0]) eq 'ARRAY' ? @{ $_[0] } : @_); - $self->search_related($rel, {})->delete; + $self->search_related( $rel, ($rel_attrs||{})->{where},($rel_attrs||{})->{where}?{join => $f_rel}:{} )->delete; $self->$add_meth($_, ref($_[1]) ? $_[1] : {}) for (@to_set); };