From: Rafael Kitover Date: Sat, 1 Aug 2009 16:10:23 +0000 (+0000) Subject: default collist for storage _resolve_column_info X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=66c7d805ba0908304807c3b9767afa1a56355f11;p=dbsrgits%2FDBIx-Class-Historic.git default collist for storage _resolve_column_info --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 946678c..528907b 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -1687,6 +1687,18 @@ sub _resolve_column_info { $sep = "\Q$sep\E"; my (%return, %converted); + + if (not $colnames) { + $colnames = [ map { + my $alias = $_; + my $source = $alias2src->{$alias}; + map "${alias}${sep}$_", $source->columns + } keys %$alias2src ]; + +# also add unqualified columns for 'me' table + push @$colnames, $alias2src->{$root_alias}->columns; + } + foreach my $col (@$colnames) { my ($alias, $colname) = $col =~ m/^ (?: ([^$sep]+) $sep)? (.+) $/x;