On Wed, Mar 10, 2010 at 11:38 AM, Peter Rabbitson
<[email protected]<rabbit%[email protected]>
> wrote:
>
>
> As you already realized down the thread, this is the wrong place to
> add a default. It's the individual cascade-setting helper that you need to
> override:
>
> sub has_many {
> my ($self, @args) = @_;
> $args[3] = { %your_defaults, %{$args[3]||{}} };
> $self->next::method(@args);
> }
>
Peter, aren't there other relationships that can have cascade_delete?
Indeed if I use the above then dump the options in add_relationship there's
plenty of other's with cascade_delete => 1, (like "has_one" relationships).
add_relationship seems more global in scope.
--
Bill Moseley
[email protected]
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]