diff options
author | Hakim Cassimally <hakim@mysociety.org> | 2014-08-04 16:12:50 +0000 |
---|---|---|
committer | Hakim Cassimally <hakim@mysociety.org> | 2014-08-14 09:44:30 +0000 |
commit | 963bfbc11643e0499162e33161ab539c6dcb611f (patch) | |
tree | dadb9f97c0d369dfd821d32ddfde7c25fc141219 /perllib/FixMyStreet/DB/Result/Comment.pm | |
parent | 382a782c16a998776176de37037dd029fab4e3fe (diff) |
Tests for moderation
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Comment.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Comment.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm index 526fbff90..3fae6860a 100644 --- a/perllib/FixMyStreet/DB/Result/Comment.pm +++ b/perllib/FixMyStreet/DB/Result/Comment.pm @@ -207,6 +207,8 @@ __PACKAGE__->has_many( # Schema::Loader, but that doesn't know about the problem_id mapping, so we now # (slightly hackishly) redefine here: # +# we also add cascade_delete, though this seems to be insufficient. +# # TODO: should add FK on moderation_original_data field for this, to get S::L to # pick up without hacks. @@ -216,7 +218,7 @@ __PACKAGE__->might_have( { "foreign.comment_id" => "self.id", "foreign.problem_id" => "self.problem_id", }, - { cascade_copy => 0, cascade_delete => 0 }, + { cascade_copy => 0, cascade_delete => 1 }, ); # we need the inline_constructor bit as we don't inherit from Moose |