10 my $schema = DBICTest->init_schema( no_populate => 1 );
12 $schema->resultset('CD')->create({
13 cdid => 0, title => '', year => 0, genreid => 0, single_track => 0, artist => {
14 artistid => 0, name => '', rank => 0, charfield => 0,
18 $schema->is_executed_querycount( sub {
19 my $cd = $schema->resultset('CD')->search( {}, { prefetch => 'artist' })->next;
23 { artist => 0, cdid => 0, genreid => 0, single_track => 0, title => '', year => 0 },
24 'Expected CD columns present',
28 { $cd->artist->get_columns },
29 { artistid => 0, charfield => 0, name => "", rank => 0 },
30 'Expected Artist columns present',
32 }, 1, 'Only one query fired - prefetch worked' );