}
$cond_rel->{"foreign.$_"} = "self.".$cond->{$_};
}
+ my $acc_type = (scalar keys %$cond_rel == 1) ? 'filter' : 'single';
$class->add_relationship($rel, $f_class,
$cond_rel,
- { accessor => 'single', %{$attrs || {}} }
+ { accessor => $acc_type, %{$attrs || {}} }
);
}
else {