On Tue, May 08, 2007 at 03:36:42PM +0100, Pedro Melo wrote: > Ok, fair enough.
I don't really like saying "we make this hard for your own good" but after seeing the damage to half a dozen projects done by making it easy ... :) > On May 8, 2007, at 12:52 PM, Matt S Trout wrote: > > >On Tue, Apr 24, 2007 at 02:25:57PM +0100, Pedro Melo wrote: > >>First, I agree with you that cascade delete on the database side is > >>probably best, and that the db-side cascading delete taking > >>preference is documented in the Relationship.pm perldoc. > >> > >>But allowing DBIC to perform the delete itself is useful when you > >>have extra business logic attached to the delete action. > > > >If you have business logic attached then you can override delete > >and do > >whatever you like in there. > > > >The automatic code is intentionally written the way it is because > >I've seen > >naive programmers cause massive data loss with Class::DBI's reverse > >approach. > > > >If you want to override the DB's FK settings, you get to do it by > >hand so it's > >Bloody Obvious (tm) in the code that that's what's going to happen. > >It's safer > >and more maintainable that way, IME. > > > >-- > > Matt S Trout Need help with your Catalyst or > >DBIx::Class project? > > Technical Director Want a managed development or deployment > >platform? > >Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk > >for a quote > > http:// > >www.shadowcatsystems.co.uk/ > > > >_______________________________________________ > >List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class > >Wiki: http://dbix-class.shadowcatsystems.co.uk/ > >IRC: irc.perl.org#dbix-class > >SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ > >Searchable Archive: http://www.mail-archive.com/dbix- > >[EMAIL PROTECTED]/ > > -- > Pedro Melo > Blog: http://www.simplicidade.org/notes/ > Jabber ID: [EMAIL PROTECTED] > Use Jabber! > > > > _______________________________________________ > List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class > Wiki: http://dbix-class.shadowcatsystems.co.uk/ > IRC: irc.perl.org#dbix-class > SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ > Searchable Archive: > http://www.mail-archive.com/[email protected]/ -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Director Want a managed development or deployment platform? Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ _______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive: http://www.mail-archive.com/[email protected]/
