[DBIx-Class-Devel] Re: [dbix-class] cascaded delete must delete relationships first (#27)

Peter Rabbitson notifications at github.com
Thu May 23 04:51:00 GMT 2013


This behavior has been there from the start by design, and at this point it is unrealistic to change: 
https://metacpan.org/source/RIBASUSHI/DBIx-Class-0.08250/lib/DBIx/Class/Relationship/Base.pm#L336

To answer your other (rather valid question) "If you are expecting the DB to to cascade, the why attempt manually with cascade deletes ?". At the time CDBI/DBIC were written (close to a decade ago), there was a lot less access to reliable foreign constraints. As such the ability to "post-cleanup" was seen as a much needed feature, and was therefore enabled by default.

The only thing I can offer you at this point is to aid in an effort of deprecating having any DBIC-side cascades by default. The patch attached to this pullreq can not be accepted though - it breaks years of expected behavior and is therefore a non-negotiable "can't do". I am therefore closing this pullreq.

Cheers



---
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/dbix-class/pull/27#issuecomment-18323238
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20130522/25ef1433/attachment.htm


More information about the DBIx-Class-Devel mailing list