X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FResultSource.pm;h=824c34d5948f9543185eea66f125a408b51530f2;hb=9738897e690b569fe7750d8b0bbe46f0afdf5b16;hp=04b634c58c9f017e24a3c6f86b41665610024c14;hpb=539ffe8768e85b2061aa3bb3616da4f848a582f3;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/ResultSource.pm b/lib/DBIx/Class/ResultSource.pm index 04b634c..824c34d 100644 --- a/lib/DBIx/Class/ResultSource.pm +++ b/lib/DBIx/Class/ResultSource.pm @@ -1205,7 +1205,7 @@ sub _resolve_join { $self->throw_exception ('You must supply a joinpath arrayref as the 4th argument to _resolve_join') unless ref $jpath eq 'ARRAY'; - $jpath = [@$jpath]; + $jpath = [@$jpath]; # copy if (not defined $join) { return (); @@ -1235,7 +1235,7 @@ sub _resolve_join { push @ret, ( $self->_resolve_join($rel, $alias, $seen, [@$jpath], $force_left), $self->related_source($rel)->_resolve_join( - $join->{$rel}, $as, $seen, [@$jpath, $rel], $force_left + $join->{$rel}, $as, $seen, [@$jpath, { $rel => $as }], $force_left ) ); } @@ -1261,7 +1261,7 @@ sub _resolve_join { ? 'left' : $rel_info->{attrs}{join_type} , - -join_path => [@$jpath, $join], + -join_path => [@$jpath, { $join => $as } ], -is_single => (List::Util::first { $rel_info->{attrs}{accessor} eq $_ } (qw/single filter/) ), -alias => $as, -relation_chain_depth => $seen->{-relation_chain_depth} || 0, @@ -1448,8 +1448,7 @@ sub resolve_prefetch { # Accepts one or more relationships for the current source and returns an # array of column names for each of those relationships. Column names are # prefixed relative to the current source, in accordance with where they appear -# in the supplied relationships. Needs an alias_map generated by -# $rs->_joinpath_aliases +# in the supplied relationships. sub _resolve_prefetch { my ($self, $pre, $alias, $alias_map, $order, $collapse, $pref_path) = @_;