X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBIHacks.pm;h=ed5de4ddf770866048aa567b1746869261acff09;hb=7d3139ac1ff52213e2dad35fc9c9d1057711256a;hp=10be9124af59f7a90b7976ccb0bafa495a449aea;hpb=6298a324307439b76419d0f5db453b0d10f10517;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBIHacks.pm b/lib/DBIx/Class/Storage/DBIHacks.pm index 10be912..ed5de4d 100644 --- a/lib/DBIx/Class/Storage/DBIHacks.pm +++ b/lib/DBIx/Class/Storage/DBIHacks.pm @@ -240,15 +240,16 @@ sub _resolve_aliastypes_from_select_args { local $sql_maker->{quote_char} = "\x00"; # so that we can regex away # generate sql chunks + local $sql_maker->{having_bind}; # these are throw away results my $to_scan = { restricting => [ $sql_maker->_recurse_where ($where), - $sql_maker->_order_by({ + $sql_maker->_parse_rs_attrs ({ map { $_ => $attrs->{$_} } (qw/group_by having/) }), ], selecting => [ - $self->_parse_order_by ($attrs->{order_by}, $sql_maker), + $self->_extract_order_columns ($attrs->{order_by}, $sql_maker), $sql_maker->_recurse_fields ($select), ], }; @@ -420,7 +421,7 @@ sub _resolve_column_info { # the top of the stack, and if not - make sure the chain is inner-joined down # to the root. # -sub _straight_join_to_node { +sub _inner_join_to_node { my ($self, $from, $alias) = @_; # subqueries and other oddness are naturally not supported @@ -535,7 +536,7 @@ sub _strip_cond_qualifiers { return $cond; } -sub _parse_order_by { +sub _extract_order_columns { my ($self, $order_by, $sql_maker) = @_; my $parser = sub {