From: Simon Elliott Date: Tue, 4 Apr 2006 12:52:56 +0000 (+0000) Subject: Fix to cascade_delete courtesy mst. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b1a94f98903f87fee75bcc41ee4b8accc0b87a1f;p=dbsrgits%2FDBIx-Class-Historic.git Fix to cascade_delete courtesy mst. --- diff --git a/lib/DBIx/Class/Relationship/CascadeActions.pm b/lib/DBIx/Class/Relationship/CascadeActions.pm index e4564c1..439cfde 100644 --- a/lib/DBIx/Class/Relationship/CascadeActions.pm +++ b/lib/DBIx/Class/Relationship/CascadeActions.pm @@ -17,7 +17,7 @@ sub delete { my %rels = map { $_ => $source->relationship_info($_) } $source->relationships; my @cascade = grep { $rels{$_}{attrs}{cascade_delete} } keys %rels; foreach my $rel (@cascade) { - $self->search_related($rel)->delete; + $self->search_related($rel)->delete_all; } return $ret; }