File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -1973,11 +1973,26 @@ sub _resolve_relationship_condition {
1973
1973
$joinfree_source -> columns
1974
1974
};
1975
1975
1976
- $fq_col_list -> {$_ } or $self -> throw_exception (
1976
+ exists $fq_col_list -> {$_ } or $self -> throw_exception (
1977
1977
" The join-free condition returned for $exception_rel_id may only "
1978
- . ' contain keys that are fully qualified column names of the corresponding source'
1978
+ . ' contain keys that are fully qualified column names of the corresponding source '
1979
+ . " (it returned '$_ ')"
1979
1980
) for keys %$jfc ;
1980
1981
1982
+ (
1983
+ length ref $_
1984
+ and
1985
+ defined blessed($_ )
1986
+ and
1987
+ $_ -> isa(' DBIx::Class::Row' )
1988
+ and
1989
+ $self -> throw_exception (
1990
+ " The join-free condition returned for $exception_rel_id may not "
1991
+ . ' contain result objects as values - perhaps instead of invoking '
1992
+ . ' ->$something you meant to return ->get_column($something)'
1993
+ )
1994
+ ) for values %$jfc ;
1995
+
1981
1996
}
1982
1997
}
1983
1998
elsif (ref $args -> {condition } eq ' HASH' ) {
Original file line number Diff line number Diff line change 67
67
},
68
68
69
69
! $args -> {self_result_object } ? () : {
70
- " $args ->{foreign_alias}.cdid" => $args -> {self_result_object }-> cd
70
+ " $args ->{foreign_alias}.cdid" => $args -> {self_result_object }-> get_column( ' cd ' )
71
71
},
72
72
73
73
! $args -> {foreign_values } ? () : {
Original file line number Diff line number Diff line change @@ -285,6 +285,12 @@ my $cd_single_track = $schema->resultset('CD')->create({
285
285
286
286
my $single_track = $cd_single_track -> tracks-> next;
287
287
288
+ is(
289
+ $single_track -> cd_cref_cond-> title,
290
+ $cd_single_track -> title,
291
+ ' Got back the expected single-track cd title' ,
292
+ );
293
+
288
294
is_deeply
289
295
{ $schema -> resultset(' Track' )-> find({ cd_cref_cond => { cdid => $cd_single_track -> id } })-> get_columns },
290
296
{ $single_track -> get_columns },
You can’t perform that action at this time.
0 commit comments