From: Matt S Trout Date: Wed, 9 Oct 2013 15:15:59 +0000 (+0000) Subject: make _resolve_aliastypes_from_select_args handle an undef select X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=df013eca50443c185f130bb6e4e1ad06cb96e671;p=dbsrgits%2FDBIx-Class.git make _resolve_aliastypes_from_select_args handle an undef select --- diff --git a/lib/DBIx/Class/Storage/DBIHacks.pm b/lib/DBIx/Class/Storage/DBIHacks.pm index 0edba97..c805dbc 100644 --- a/lib/DBIx/Class/Storage/DBIHacks.pm +++ b/lib/DBIx/Class/Storage/DBIHacks.pm @@ -152,7 +152,7 @@ sub _adjust_select_args_for_complex_prefetch { # join collapse *will not work* on heavy data types. my $connecting_aliastypes = $self->_resolve_aliastypes_from_select_args( $from, - [], + undef, $where, $inner_attrs ); @@ -504,7 +504,9 @@ sub _resolve_aliastypes_from_select_args { ), ], selecting => [ - scalar $sql_maker->_render_sqla(select_select => $select), + ($select + ? ($sql_maker->_render_sqla(select_select => $select))[0] + : ()), ], ordering => [ map { $_->[0] } $self->_extract_order_criteria ($attrs->{order_by}, $sql_maker),