Created
October 2, 2009 15:50
-
-
Save rbuels/199840 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sub delete_synonym { | |
| my $self=shift; | |
| my $synonym=shift; | |
| my $schema = $self->result_source->schema; | |
| my @synonyms= $schema->resultset("Cv::Cvtermsynonym")->search( | |
| { cvterm_id => $self->get_column('cvterm_id'), | |
| synonym => { 'ilike' , "$synonym" } | |
| }); | |
| foreach (@synonyms) { $_->delete(); } | |
| } | |
| # goes to | |
| sub delete_synonym { | |
| my $self = shift; | |
| my $synonym = shift; | |
| $self->result_source | |
| ->schema | |
| ->resultset("Cv::Cvtermsynonym") | |
| ->search({ cvterm_id => $self->get_column('cvterm_id'), | |
| synonym => { 'ilike' , $synonym } | |
| }) | |
| ->delete; | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment