Commit d3f2b9a2 authored by Will Spooner's avatar Will Spooner
Browse files

fetch_all_by_feature_class method now throws if there is an orphen analysis_id...

fetch_all_by_feature_class method now throws if there is an orphen analysis_id foreign key in the "feature_class" table
parent 003b4c91
......@@ -159,7 +159,14 @@ SELECT DISTINCT analysis_id FROM %s |;
my $sth = $self->prepare( $sql );
my $rv = $sth->execute();
my $res = $sth->fetchall_arrayref;
return [ map{ $self->fetch_by_dbID($_->[0]) } @{$res} ];
my @analyses;
foreach my $r( @{$res} ){
my $analysis = $self->fetch_by_dbID($r->[0])
|| throw( "analysis_id $r->[0] from $feat_table table "
. "is not in the analysis table!" );
push @analyses, $analysis;
}
return [@analyses];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment