On Fri, 24 Oct 2008, Noel Burton-Krahn wrote:
DBIx's cascading delete_all (in DBIx::Class::ResultSet) it broken, because it deletes the parent table before it deletes the children. The database will throw a referential integrity exception when the parent is deleted before the children. I've attached a test program below. Here's a fixed version in
This is intentional. DBICs cascade delete / relationship support deletes in this fashion so that it does not get in the way of your database itself doing it.
Either: Let DBIC do the deleting in this way for you, or turn off DBICs cascading and let your database do it.
Jess _______________________________________________ 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]
