$joinfree_source->columns
};
- $fq_col_list->{$_} or $self->throw_exception (
+ exists $fq_col_list->{$_} or $self->throw_exception (
"The join-free condition returned for $exception_rel_id may only "
- . 'contain keys that are fully qualified column names of the corresponding source'
+ . 'contain keys that are fully qualified column names of the corresponding source '
+ . "(it returned '$_')"
) for keys %$jfc;
+ (
+ length ref $_
+ and
+ defined blessed($_)
+ and
+ $_->isa('DBIx::Class::Row')
+ and
+ $self->throw_exception (
+ "The join-free condition returned for $exception_rel_id may not "
+ . 'contain result objects as values - perhaps instead of invoking '
+ . '->$something you meant to return ->get_column($something)'
+ )
+ ) for values %$jfc;
+
}
}
elsif (ref $args->{condition} eq 'HASH') {
},
! $args->{self_result_object} ? () : {
- "$args->{foreign_alias}.cdid" => $args->{self_result_object}->cd
+ "$args->{foreign_alias}.cdid" => $args->{self_result_object}->get_column('cd')
},
! $args->{foreign_values} ? () : {
my $single_track = $cd_single_track->tracks->next;
+is(
+ $single_track->cd_cref_cond->title,
+ $cd_single_track->title,
+ 'Got back the expected single-track cd title',
+);
+
is_deeply
{ $schema->resultset('Track')->find({ cd_cref_cond => { cdid => $cd_single_track->id } })->get_columns },
{ $single_track->get_columns },