[Dbix-class] might_have cascade_* documentation clarification [patch]

Adam Sjøgren asjo at koldfront.dk
Tue Sep 30 20:21:04 BST 2008


Here is a tiny patch for the might_have documentation, to add mention of
the cascade_update attribute.

The current wording sounds like you can turn off update cascading by
setting the cascade_delete attribute, which I don't think reflects the
code, when I quickly glance at DBIx::Class::Relationship::CascadeActions.


  Best regards,

     Adam


diff --git a/lib/DBIx/Class/Relationship.pm b/lib/DBIx/Class/Relationship.pm
index 8de8cc0..56e40d5 100644
--- a/lib/DBIx/Class/Relationship.pm
+++ b/lib/DBIx/Class/Relationship.pm
@@ -416,8 +416,8 @@ relations that are across multiple columns.
 
 If you update or delete an object in a class with a C<might_have>
 relationship, the related object will be updated or deleted as well. To
-turn off this behavior, add C<< cascade_delete => 0 >> to the C<$attr>
-hashref.
+turn off this behavior, add C<< cascade_update => 0 >> and/or
+C<< cascade_delete => 0 >> to the C<$attr> hashref.
 
 The cascaded operations are performed after the requested delete or
 update, so if your database has a constraint on the relationship, it


-- 
 "I wanted a computer, not a glorified fruit machine."        Adam Sjøgren
                                                         asjo at koldfront.dk



More information about the DBIx-Class mailing list