X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FData%2FResult%2FContestProblem.pm;h=fd720add20ca7650dd5cb7521543424f0c4e4b5d;hb=78c794d653161038dd4ef5986d7c7a5b96baff82;hp=bf57e09ef37a71a258a833f83c8cc0afead951f9;hpb=9bb399215eed61555c05f025aedf6dc53f4e977d;p=gruntmaster-data.git diff --git a/lib/Gruntmaster/Data/Result/ContestProblem.pm b/lib/Gruntmaster/Data/Result/ContestProblem.pm index bf57e09..fd720ad 100644 --- a/lib/Gruntmaster/Data/Result/ContestProblem.pm +++ b/lib/Gruntmaster/Data/Result/ContestProblem.pm @@ -6,7 +6,7 @@ package Gruntmaster::Data::Result::ContestProblem; =head1 NAME -Gruntmaster::Data::Result::ContestProblem +Gruntmaster::Data::Result::ContestProblem - Many-to-many bridge between contests and problems =cut @@ -91,11 +91,20 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-05-16 15:03:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fG3PNI7Ar318nxMchtJNuA +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-12-19 16:44:22 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dTFBC3ZKB2T9SCiyQxxe2w +use Class::Method::Modifiers qw/after/; + +sub rawcontest { shift->get_column('contest') } +sub rawproblem { shift->get_column('problem') } + +after qw/insert update delete/ => sub { + my ($self) = @_; + Gruntmaster::Data::purge '/pb/'; + Gruntmaster::Data::purge '/pb/' . $self->rawproblem; +}; -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1; __END__