line |
true |
false |
branch |
19
|
96 |
93 |
if exists $self->raw->{'id'} |
24
|
0 |
890 |
unless exists $self->raw->{'id'} |
35
|
87 |
20 |
if $type->has_attribute($name) |
38
|
20 |
0 |
if ($type->has_relationship($name)) |
43
|
4 |
7 |
if $rel->{'is_has_one'} or $rel->{'is_has_many'} and $rel->{'is_right_entity'} |
46
|
0 |
16 |
wantarray ? : |
64
|
0 |
112 |
unless defined $self->id |
70
|
112 |
0 |
if @attrs == 0 |
90
|
0 |
112 |
unless ref $data eq 'HASH' |
115
|
0 |
98 |
if 1 > $numargs or $numargs > 2 |
118
|
2 |
96 |
if ($numargs == 2) { } |
|
96 |
0 |
elsif ($numargs == 1) { } |
122
|
0 |
96 |
unless ref $_[0] eq 'HASH' |
135
|
16 |
137 |
if ($type->has_relationship($attr_name)) |
141
|
0 |
137 |
if $attr_name eq 'id' |
148
|
0 |
6 |
if defined $value and exists $self->raw->{$attr_name} and defined $self->raw->{$attr_name} and $value eq $self->raw->{$attr_name} |
152
|
135 |
2 |
unless exists $self->_modified->{$attr_name} |
165
|
0 |
0 |
unless ref $data eq 'HASH' or ref $data eq 'ARRAY' or &blessed($data) and $data->isa('DBIx::EAV::Entity') |
169
|
0 |
3 |
if ref $data eq 'ARRAY' and $rel->{'is_has_one'} || $rel->{'is_has_many'} && $rel->{'is_right_entity'} |
189
|
91 |
4 |
if ($is_new_entity) |
198
|
0 |
91 |
unless $id > 0 |
204
|
0 |
91 |
unless $static_attributes->{'id'} == $id |
224
|
2 |
130 |
if ($attr_spec->{'is_static'}) |
237
|
1 |
129 |
if (not defined $value) { } |
|
1 |
128 |
elsif (defined $old_value) { } |
260
|
95 |
0 |
if ($modified_count > 0) |
262
|
1 |
94 |
if keys %modified_static_attributes > 0 |
278
|
0 |
18 |
$rel->{'is_right_entity'} ? : |
285
|
16 |
2 |
unless $options->{'keep_current_links'} |
288
|
17 |
1 |
ref $data eq 'ARRAY' ? : |
291
|
22 |
29 |
if (&blessed($entity)) { } |
|
29 |
0 |
elsif (ref $entity eq 'HASH') { } |
293
|
0 |
22 |
unless $entity->isa('DBIx::EAV::Entity') |
296
|
0 |
22 |
unless $entity->type->id == $related_type->id |
299
|
0 |
22 |
unless $entity->in_storage |
307
|
1 |
21 |
unless $rel->{'is_many_to_many'} |
322
|
0 |
51 |
unless $relationship_table->insert({'relationship_id', $rel->{'id'}, $our_side . '_entity_id', $self->id, $their_side . '_entity_id', $entity->id}) |
332
|
1 |
1 |
if $rel->{'is_has_one'} or $rel->{'is_has_many'} and $rel->{'is_right_entity'} |
343
|
1 |
1 |
if $rel->{'is_has_one'} or $rel->{'is_has_many'} and $rel->{'is_right_entity'} |
346
|
0 |
2 |
$rel->{'is_right_entity'} ? : |
348
|
2 |
0 |
unless ref $data eq 'ARRAY' |
353
|
0 |
2 |
unless &blessed($entity) and $entity->isa('DBIx::EAV::Entity') and $entity->type->name eq $rel->{'entity'} |
378
|
0 |
24 |
unless $self->in_storage |
389
|
6 |
21 |
if $rel->{'is_right_entity'} or $rel->{'is_many_to_many'} or exists $rel->{'cascade_delete'} and $rel->{'cascade_delete'} == 0 |
397
|
0 |
24 |
unless ($eav->schema->database_cascade_delete) |
428
|
0 |
20 |
if ref $class |
435
|
0 |
11 |
if ref $class |
436
|
0 |
11 |
unless $class->is_custom_class |
440
|
3 |
8 |
unless (defined *{"${class}::__TYPE_DEFINITION__";}) |
445
|
1 |
2 |
if $parent_class ne 'DBIx::EAV::Entity' |
461
|
0 |
7 |
if ref $class |
462
|
0 |
7 |
unless $class->is_custom_class |
465
|
6 |
1 |
$stuff eq 'attribute' ? : |