with debian packaging
- Patch to fix ? in data for NoBindVars (from Tom Hukins)
- Restored mk_classaccessor method for compatibility
+ - Fixed group_by problem with oracle limit syntax
+ - Fixed attr merging problem
+ - Fixed $rs->get_column w/prefetch problem
0.08002 2007-06-20 06:10:00
- add scope guard to Row::insert to ensure rollback gets called
sub new {
my ($class, $rs, $column) = @_;
$class = ref $class if ref $class;
- my $new = bless { _column => $column, _parent_resultset => $rs }, $class;
+ my $new_parent_rs = $rs->search_rs; # we don't want to mess up the original, so clone it
+ $new_parent_rs->{attrs}->{prefetch} = undef; # prefetch causes additional columns to be fetched
+ my $new = bless { _column => $column, _parent_resultset => $new_parent_rs }, $class;
$new->throw_exception("column must be supplied") unless $column;
return $new;
}
my $schema = DBICTest->init_schema();
-plan tests => 8;
+plan tests => 9;
my $cd;
my $rs = $cd = $schema->resultset("CD")->search({});
ok(defined($psrs->get_column('count')), '+select/+as arrayref count');
ok(defined($psrs->get_column('addedtitle')), '+select/+as title');
+{
+ my $rs = $schema->resultset("CD")->search({}, { prefetch => 'artist' });
+ my $rsc = $rs->get_column('year');
+ is( $rsc->{_parent_resultset}->{attrs}->{prefetch}, undef, 'prefetch wiped' );
+}