X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FRelationship%2FBase.pm;h=2f8083ab4f216cf4b817345007ec3156c544699b;hb=5f7ac523d6179423620e5d20a83d3245a2f29385;hp=62133a8dce0d21b31e0dcccd5e431687d6d5cc3f;hpb=de5ce4818508f52aa7489847319de5bab0ff4454;p=dbsrgits%2FDBIx-Class.git 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