X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FCDBICompat%2FLazyLoading.pm;h=21bcdcd43260360935ddfec61a93b4f54fe97d84;hb=78bab9cad621ac5e3d1d12b02c41d662dec7a22a;hp=e991cc012508c99b1564b83ba01ea42eaa2dbf32;hpb=12bbb33986a29dc27dd3e2b9d082a87f50124ec1;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/CDBICompat/LazyLoading.pm b/lib/DBIx/Class/CDBICompat/LazyLoading.pm index e991cc0..21bcdcd 100644 --- a/lib/DBIx/Class/CDBICompat/LazyLoading.pm +++ b/lib/DBIx/Class/CDBICompat/LazyLoading.pm @@ -20,14 +20,15 @@ sub get_column { sub _flesh { my ($self, @groups) = @_; + @groups = ('All') unless @groups; my %want; $want{$_} = 1 for map { keys %{$self->_column_groups->{$_}} } @groups; if (my @want = grep { !exists $self->{'_column_data'}{$_} } keys %want) { - #warn "@want"; my $sth = $self->_get_sth('select', \@want, $self->_table_name, $self->_ident_cond); $sth->execute($self->_ident_values); my @val = $sth->fetchrow_array; + $sth->finish; foreach my $w (@want) { $self->{'_column_data'}{$w} = shift @val; }