diff --git a/lib/DBIx/Class/Relationship/Base.pm b/lib/DBIx/Class/Relationship/Base.pm index ba1b06559..313e6e95e 100644 --- a/lib/DBIx/Class/Relationship/Base.pm +++ b/lib/DBIx/Class/Relationship/Base.pm @@ -383,7 +383,10 @@ be copied too. To turn this behaviour off, pass C<< cascade_copy => 0 >> in the C<$attr> hashref. The behaviour defaults to C<< cascade_copy => 1 >> for C -relationships. +relationships. If your C<$condition> is a coderef (see L) +the default changes to C<< cascade_copy => 0 >>, and you need to +explicitly turn this feature on by passing C<< cascade_copy => 1 >> +in the C<$attr> hashref. =item cascade_delete @@ -392,6 +395,11 @@ C and C relationships. You can disable this behaviour on a per-relationship basis by supplying C<< cascade_delete => 0 >> in the relationship attributes. +If your C<$condition> is a coderef (see L) +the default changes to C<< cascade_delete => 0 >>, and you need to +explicitly turn this feature on by passing C<< cascade_delete => 1 >> +in the C<$attr> hashref. + The cascaded operations are performed after the requested delete, so if your database has a constraint on the relationship, it will have deleted/updated the related records or raised an exception @@ -404,6 +412,11 @@ C relationships. You can disable this behaviour on a per-relationship basis by supplying C<< cascade_update => 0 >> in the relationship attributes. +If your C<$condition> is a coderef (see L) +the default changes to C<< cascade_update => 0 >>, and you need to +explicitly turn this feature on by passing C<< cascade_update => 1 >> +in the C<$attr> hashref. + The C relationship does not update across relationships by default, so if you have a 'proxy' attribute on a belongs_to and want to use 'update' on it, you must set C<< cascade_update => 1 >>.