[Bast-commits] r9320 - DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship

nigel at dev.catalyst.perl.org nigel at dev.catalyst.perl.org
Fri May 7 13:28:07 GMT 2010


Author: nigel
Date: 2010-05-07 14:28:06 +0100 (Fri, 07 May 2010)
New Revision: 9320

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/Base.pm
Log:
Added reference to cascade_* in relationship attributes

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/Base.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/Base.pm	2010-05-07 13:03:00 UTC (rev 9319)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/Base.pm	2010-05-07 13:28:06 UTC (rev 9320)
@@ -122,6 +122,37 @@
 should, set this attribute to a true or false value to override the detection
 of when to create constraints.
 
+=item cascade_copy
+
+If C<cascade_copy> is true on a C<has_many> relationship for an
+object, then when you copy the object all the related objects will
+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 >>.
+
+=item cascade_delete
+
+By default, DBIx::Class cascades deletes across C<has_many> and
+C<might_have> relationships. You can disable this behaviour on a
+per-relationship basis by supplying C<< cascade_delete => 0 >> in the
+relationship attributes.
+
+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
+before DBIx::Class gets to perform the cascaded operation.
+
+=item cascade_update
+
+By default, DBIx::Class cascades updates across C<has_many> and
+C<might_have> relationships. You can disable this behaviour on a
+per-relationship basis by supplying C<< cascade_update => 0 >> in the
+relationship attributes.
+
+The cascaded operations are performed after the requested update,
+so if your database has a constraint on the relationship, it will
+have updated/updated the related records or raised an exception
+before DBIx::Class gets to perform the cascaded operation.
+
 =item on_delete / on_update
 
 If you are using L<SQL::Translator> to create SQL for you, you can use these




More information about the Bast-commits mailing list