I'm working on a new app, where I have a "main" table called "word",
that belongs_to some other tables, including "status".

While testing a proof-of-concept version of this app, a colleague made
the obvious discovery that if you delete a status, you'll also
(cascadingly) delete all the words having that status. This is bad.
However, if I just set cascade_delete => 0 for the relationship,
deleting the status will result in these words having a status_id column
that points to a nonexistent row.

Are there standard ways of dealing with this automatically, so that, for
example, deleting the status will instead set the status_id column of
all related words to NULL? Or what else are the usual solutions?

Jesse Sheidlower

_______________________________________________
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