X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FResultSetColumn.pm;h=12623a3370da64817648cf2ea1c3a1af129d48cd;hp=b4707e63be35e7d5954eb94f2cbe994ff72dd087;hb=37aafa2ede65e38af8fe9eda374ad4626290932f;hpb=0ac0af6c62637a5fdb06ecfb8ba4b60f93bf9d75 diff --git a/lib/DBIx/Class/ResultSetColumn.pm b/lib/DBIx/Class/ResultSetColumn.pm index b4707e6..12623a3 100644 --- a/lib/DBIx/Class/ResultSetColumn.pm +++ b/lib/DBIx/Class/ResultSetColumn.pm @@ -71,7 +71,7 @@ sub new { ) { # nuke the prefetch before collapsing to sql my $subq_rs = $rs->search; - $subq_rs->{attrs}{join} = $subq_rs->_merge_attr( $subq_rs->{attrs}{join}, delete $subq_rs->{attrs}{prefetch} ); + $subq_rs->{attrs}{join} = $subq_rs->_merge_joinpref_attr( $subq_rs->{attrs}{join}, delete $subq_rs->{attrs}{prefetch} ); $new_parent_rs = $subq_rs->as_subselect_rs; } @@ -82,7 +82,7 @@ sub new { # rs via the _resolved_attrs trick - we need to retain the separation between # +select/+as and select/as. At the same time we want to preserve any joins that the # prefetch would otherwise generate. - $new_attrs->{join} = $rs->_merge_attr( $new_attrs->{join}, delete $new_attrs->{prefetch} ); + $new_attrs->{join} = $rs->_merge_joinpref_attr( $new_attrs->{join}, delete $new_attrs->{prefetch} ); # {collapse} would mean a has_many join was injected, which in turn means # we need to group *IF WE CAN* (only if the column in question is unique)