9 my $schema = DBICTest->init_schema(
13 $schema->resultset('CD')->create({
27 my $orig_debug = $schema->storage->debug;
30 $schema->storage->debugcb(sub { $queries++; });
31 $schema->storage->debug(1);
33 my $cd = $schema->resultset('CD')->search( {}, { prefetch => 'artist' })->next;
45 'Expected CD columns present',
49 { $cd->artist->get_columns },
56 'Expected Artist columns present',
59 is $queries, 1, 'Only one query fired - prefetch worked';
61 $schema->storage->debugcb(undef);
62 $schema->storage->debug($orig_debug);