10 my $schema = DBICTest->init_schema(
14 $schema->resultset('CD')->create({
28 my $orig_debug = $schema->storage->debug;
31 $schema->storage->debugcb(sub { $queries++; });
32 $schema->storage->debug(1);
34 my $cd = $schema->resultset('CD')->search( {}, { prefetch => 'artist' })->next;
46 'Expected CD columns present',
50 { $cd->artist->get_columns },
57 'Expected Artist columns present',
60 is $queries, 1, 'Only one query fired - prefetch worked';
62 $schema->storage->debugcb(undef);
63 $schema->storage->debug($orig_debug);