From: Rafael Kitover Date: Sun, 19 Jul 2009 21:57:11 +0000 (+0000) Subject: mangling _select_args turned out to be unnecessary X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b5453fbb2a8b2a70d852a8673dcc98f7d51f8bf7;p=dbsrgits%2FDBIx-Class-Historic.git mangling _select_args turned out to be unnecessary --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index ed1cdc0..724b33f 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -2780,7 +2780,10 @@ sub _resolved_attrs { : "${alias}.$_" ) } - } ( ref($attrs->{columns}) eq 'ARRAY' ) ? @{ delete $attrs->{columns}} : (delete $attrs->{columns} || $source->columns ); + } ( ref($attrs->{columns}) eq 'ARRAY' ) ? + @{ delete $attrs->{columns}} : + (delete $attrs->{columns} || + $source->storage->order_columns_for_select($source) ); } # add the additional columns on foreach ( 'include_columns', '+columns' ) { diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 1d1e57b..6eefbfa 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -2277,6 +2277,23 @@ sub lag_behind_master { return; } +=head2 order_columns_for_select + +Returns an ordered list of column names for use with a C