Branch Coverage

blib/lib/DBR/Config/Relation.pm
Criterion Covered Total %
branch 20 34 58.8


line true false branch
40 0 34 unless ref $table_ids eq 'ARRAY'
42 0 34 unless @$table_ids
46 0 34 unless my $relations = $dbrh->select(-'table', 'dbr_relationships', -'fields', 'relationship_id from_name from_table_id from_field_id to_name to_table_id to_field_id type', -'where', {'from_table_id', ['d in', @$table_ids]})
56 0 24 unless my $table1 = 'DBR::Config::Table'->_register_relation('table_id', $$relation{'to_table_id'}, 'name', $$relation{'from_name'}, 'relation_id', $$relation{'relationship_id'})
62 0 24 unless my $table2 = 'DBR::Config::Table'->_register_relation('table_id', $$relation{'from_table_id'}, 'name', $$relation{'to_name'}, 'relation_id', $$relation{'relationship_id'})
91 0 44 unless $$self{'relation_id'}
92 0 44 unless $$self{'table_id'}
95 0 44 unless my $ref = $RELATIONS_BY_ID{$$self{'relation_id'}}
96 0 44 unless $TYPES{$$ref{'type'}}
98 25 19 if ($$ref{'from_table_id'} == $$self{'table_id'}) { }
19 0 elsif ($$ref{'to_table_id'} == $$self{'table_id'}) { }
129 0 9 unless my $field = 'DBR::Config::Field'->new('session', $$self{'session'}, 'field_id', $field_id)
141 0 21 unless my $field = 'DBR::Config::Field'->new('session', $$self{'session'}, 'field_id', $mapfield_id)
170 26 4 if $mode eq 'Mto1'
171 0 4 if $mode eq '1to1'
183 8 58 if (defined $set)
184 0 8 if defined $$self{'index'}