From: Nigel Metheringham Date: Fri, 7 May 2010 13:28:06 +0000 (+0000) Subject: Added reference to cascade_* in relationship attributes X-Git-Tag: v0.08122~78 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5f7ac523d6179423620e5d20a83d3245a2f29385;p=dbsrgits%2FDBIx-Class.git Added reference to cascade_* in relationship attributes --- diff --git a/lib/DBIx/Class/Relationship/Base.pm b/lib/DBIx/Class/Relationship/Base.pm index 62133a8..2f8083a 100644 --- a/lib/DBIx/Class/Relationship/Base.pm +++ b/lib/DBIx/Class/Relationship/Base.pm @@ -122,6 +122,37 @@ is creating constraints where it shouldn't, or not creating them where it should, set this attribute to a true or false value to override the detection of when to create constraints. +=item cascade_copy + +If C is true on a C 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 and +C 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 and +C 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 to create SQL for you, you can use these