unless defined $rel_obj->{attrs}{accessor};
if ($rel_obj->{attrs}{accessor} eq 'single') {
foreach my $pri ($rel_obj->{class}->primary_columns) {
- next PRE unless defined $fetched->get_column($pri);
+ unless (defined $fetched->get_column($pri)) {
+ undef $fetched;
+ last;
+ }
}
$new->{_relationship_data}{$pre} = $fetched;
} elsif ($rel_obj->{attrs}{accessor} eq 'filter') {
is($cd[0]->title, 'Spoonful of bees', 'First record returned ok');
-ok(!exists $cd[0]->{_relationship_data}{liner_notes}, 'No prefetch for NULL LEFT JOIN');
+ok(!defined $cd[0]->liner_notes, 'No prefetch for NULL LEFT join');
is($cd[1]->{_relationship_data}{liner_notes}->notes, 'Buy Whiskey!', 'Prefetch for present LEFT JOIN');