From: Peter Rabbitson Date: Thu, 29 Mar 2012 02:53:28 +0000 (+0200) Subject: Anything that isn't in the selector list needs a realias X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4d45ab4bce705ae919b3bdc7f1dcb0dfd00608cd;p=dbsrgits%2FDBIx-Class-Historic.git Anything that isn't in the selector list needs a realias --- diff --git a/lib/DBIx/Class/SQLMaker/LimitDialects.pm b/lib/DBIx/Class/SQLMaker/LimitDialects.pm index e91a0c5..0f3e498 100644 --- a/lib/DBIx/Class/SQLMaker/LimitDialects.pm +++ b/lib/DBIx/Class/SQLMaker/LimitDialects.pm @@ -735,11 +735,14 @@ sub _subqueried_limit_attrs { # unless we are dealing with the current source alias # (which will transcend the subqueries as it is necessary # for possible further chaining) + # same for anything we do not recognize my ($sel, $renamed); for my $node (@sel) { push @{$sel->{original}}, $node->{sql}; if ( + ! $in_sel_index->{$node->{sql}} + or $node->{as} =~ / (?{unquoted_sql} =~ / (?