$rel_info->{cond}, $rel, $self, $rel
);
- $self->throw_exception("Custom relationship '$rel' does not resolve to a join-free condition fragment")
+ $self->throw_exception("Relationship '$rel' does not resolve to a join-free condition fragment")
if $crosstable;
if (
my ($cond, $crosstable, $nonequality_foreign_columns) = $rsrc->_resolve_condition (
$rel_info->{cond}, $f_obj, $rel, $rel
);
- $self->throw_exception("Custom relationship '$rel' does not resolve to a join-free condition fragment")
+ $self->throw_exception("Relationship '$rel' does not resolve to a join-free condition fragment")
if $crosstable;
$self->throw_exception(sprintf (
);
$self->throw_exception(
- "Custom relationship '$rel' does not resolve to a join-free condition, "
+ "Relationship '$rel' does not resolve to a join-free condition, "
."unable to use with the ManyToMany helper '$f_rel'"
) if $crosstable;
next if $keyref eq 'ARRAY'; # has_many for multi_create
- my $rel_q = $rsrc->_resolve_condition(
+ my ($rel_cond, $crosstable) = $rsrc->_resolve_condition(
$relinfo->{cond}, $val, $key, $key
);
- die "Can't handle complex relationship conditions in find" if ref($rel_q) ne 'HASH';
- @related{keys %$rel_q} = values %$rel_q;
+
+ $self->throw_exception("Complex condition via relationship '$key' is unsupported in find()")
+ if $crosstable or ref($rel_cond) ne 'HASH';
+
+ # supplement
+ @related{keys %$rel_cond} = values %$rel_cond;
}
}
# try a specific everything via a non-simplified rel
throws_ok {
$artist->create_related('cds_90s', { title => 'related_creation 4', year => '2038' });
-} qr/\QCustom relationship 'cds_90s' does not resolve to a join-free condition fragment/,
+} qr/\QRelationship 'cds_90s' does not resolve to a join-free condition fragment/,
'Create failed - non-simplified rel';
# Do a self-join last-entry search