8 my $schema = DBICTest->init_schema();
11 #$schema->storage->debugfh(IO::File->new('t/var/temp.trace', 'w'));
12 $schema->storage->debugcb( sub{ $queries++ } );
14 eval "use DBD::SQLite";
15 plan skip_all => 'needs DBD::SQLite for testing' if $@;
19 my $cd = $schema->resultset("CD")->find(1);
24 $schema->storage->debug(1);
28 is($queries, 1, 'liner_notes (might_have) not prefetched - do not load
29 liner_notes on update');
31 $schema->storage->debug(0);
34 my $cd2 = $schema->resultset("CD")->find(2, {prefetch => 'liner_notes'});
39 $schema->storage->debug(1);
43 is($queries, 1, 'liner_notes (might_have) prefetched - do not load
44 liner_notes on update');
46 $schema->storage->debug(0);