X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBIHacks.pm;h=43faccfa12c080f835ba47e2dc75027777aeafea;hb=38f42d8556c1df2265c242a1eee7ebabc5e6dfb5;hp=f549204cea514652f1e6ae43fd635ac9417fdd9d;hpb=539ffe8768e85b2061aa3bb3616da4f848a582f3;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Storage/DBIHacks.pm b/lib/DBIx/Class/Storage/DBIHacks.pm index f549204..43faccf 100644 --- a/lib/DBIx/Class/Storage/DBIHacks.pm +++ b/lib/DBIx/Class/Storage/DBIHacks.pm @@ -43,7 +43,6 @@ sub _prune_unused_joins { return \@newfrom; } - # # This is the code producing joined subqueries like: # SELECT me.*, other.* FROM ( SELECT me.* FROM ... ) JOIN other ON ... @@ -255,7 +254,7 @@ sub _resolve_aliastypes_from_select_args { for my $type (keys %$aliases_by_type) { for my $alias (keys %{$aliases_by_type->{$type}}) { $aliases_by_type->{$type}{$_} = 1 - for (@{ $alias_list->{$alias}{-join_path} || [] }); + for (map { keys %$_ } @{ $alias_list->{$alias}{-join_path} || [] }); } } @@ -400,7 +399,7 @@ sub _straight_join_to_node { # anyway, and deep cloning is just too fucking expensive # So replace the first hashref in the node arrayref manually my @new_from = ($from->[0]); - my $sw_idx = { map { $_ => 1 } @$switch_branch }; + my $sw_idx = { map { values %$_ => 1 } @$switch_branch }; for my $j (@{$from}[1 .. $#$from]) { my $jalias = $j->[0]{-alias};