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

Graham Barr notifications at github.com
Thu May 23 14:40:42 GMT 2013


@abraxxa you are right, I was forgetting about deploy.

So, how about a new attribute `cascade_delete_before`

If it does not exist, or is undefined, then things stay as they are. If it defined then the cascade code would be run before the delete of the main row, but only if it is true.

So cascade_delete=1 and cascade_delete_before=0 would depend completely on the RDBMS doing the cascade and cascade_delete=1 and cascade_delete_before=1 would delete the relationships before deleting the row

With this existing code would be completely unaffected and the new attribute will control where and if the code attempts the cascade the delete

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


More information about the DBIx-Class-Devel mailing list