Hi,

On Wed, Mar 10, 2010 at 3:53 PM, Bill Moseley <[email protected]> wrote:
> On Wed, Mar 10, 2010 at 7:10 AM, Pedro Melo <[email protected]> wrote:
>> The reason I coded it this way was to allow a specific relation to set
>> cascade_delete => 1. My code defaults to cascade_delete => 0 but
>> allows cascade_delete => 1, but your version seems to force
>> cascade_delete => 0 in all cases. So it really depends on what you
>> actually want.
>
> Oh, "*unless* exists".  Sorry, I assumed you used "if exists".  I'm not sure
> "unless exists" works because doesn't DBIC add cascade_delete = 1 by default
> to all relationships that can do cascade_delete even if not explicitly set?
>  That is, cascade_delete key always exists even when not explicitly set on a
> relationship.

You are right. Please ignore my code.

I assumed that cascade_delete => 1 was set on the add_relantionship()
and not on the helpers that call add_relantionship().


> I figured if I needed to turn it back on just for some relationships I'd
> have to add something like "really_cascade_delete => 1" and then look for
> that in the options hash.

Yeah, or use a value != 1.

Bye,
-- 
Pedro Melo
http://www.simplicidade.org/
xmpp:[email protected]
mailto:[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]

Reply via email to