[Catalyst-commits] r8094 -
Catalyst-Controller-DBIC-API/1.000/trunk/lib/Catalyst/Controller/DBIC/API
lukes at dev.catalyst.perl.org
lukes at dev.catalyst.perl.org
Wed Jul 9 17:32:35 BST 2008
Author: lukes
Date: 2008-07-09 17:32:34 +0100 (Wed, 09 Jul 2008)
New Revision: 8094
Modified:
Catalyst-Controller-DBIC-API/1.000/trunk/lib/Catalyst/Controller/DBIC/API/Base.pm
Log:
don't bother passing cols to select if we want all cols
Modified: Catalyst-Controller-DBIC-API/1.000/trunk/lib/Catalyst/Controller/DBIC/API/Base.pm
===================================================================
--- Catalyst-Controller-DBIC-API/1.000/trunk/lib/Catalyst/Controller/DBIC/API/Base.pm 2008-07-09 12:08:15 UTC (rev 8093)
+++ Catalyst-Controller-DBIC-API/1.000/trunk/lib/Catalyst/Controller/DBIC/API/Base.pm 2008-07-09 16:32:34 UTC (rev 8094)
@@ -31,14 +31,14 @@
my $req_params = (grep { ref $_ } values %{$c->req->params}) ? $c->req->params : $self->expand_hash($c->req->params);
my $source = $c->stash->{$self->rs_stash_key}->result_source;
- my @columns = (scalar(@{$self->list_returns})) ? @{$self->list_returns} : $source->columns;
+ my @columns = (scalar(@{$self->list_returns})) ? @{$self->list_returns} : ();
my %search_params;
my ($params, $join) = $self->_format_search({ params => $req_params->{search}, source => $source }) if ($req_params->{search});
# use Data::Dumper; warn Dumper($params, $join);
- $c->stash->{$self->rs_stash_key} = $c->stash->{$self->rs_stash_key}->search($params, { join => $join, select => \@columns });
+ $c->stash->{$self->rs_stash_key} = $c->stash->{$self->rs_stash_key}->search($params, { join => $join, scalar(@columns) ? ( select => \@columns ) : () });
$c->forward('format_list');
}
More information about the Catalyst-commits
mailing list