8 my $schema = DBICTest->init_schema();
10 my $cds_rs = $schema->resultset('CD')->search(
13 'me.title' => "Caterwaulin' Blues",
14 'cds.title' => { '!=' => 'Forkful of bees' }
17 'me.title' => { '!=', => "Caterwaulin' Blues" },
18 'cds.title' => 'Forkful of bees'
22 order_by => [qw(me.cdid cds.title)],
23 prefetch => { artist => 'cds' },
24 result_class => 'DBIx::Class::ResultClass::HashRefInflator',
28 is_deeply [ $cds_rs->all ], [
30 'single_track' => undef,
35 'single_track' => undef,
38 'title' => 'Forkful of bees',
45 'name' => 'Caterwauler McCrae',
48 'title' => 'Spoonful of bees',
53 'single_track' => undef,
58 'single_track' => undef,
61 'title' => 'Forkful of bees',
68 'name' => 'Caterwauler McCrae',
71 'title' => 'Forkful of bees',
76 'single_track' => undef,
81 'single_track' => undef,
84 'title' => 'Caterwaulin\' Blues',
89 'single_track' => undef,
92 'title' => 'Spoonful of bees',
99 'name' => 'Caterwauler McCrae',
102 'title' => 'Caterwaulin\' Blues',
106 ], 'multi-level prefetch with restrictions ok';