9 my $schema = DBICTest->init_schema();
13 # bug in 0.07000 caused attr (join/prefetch) to be modifed by search
14 # so we check the search & attr arrays are not modified
15 my $search = { 'artist.name' => 'Caterwauler McCrae' };
16 my $attr = { prefetch => [ qw/artist liner_notes/ ],
17 order_by => 'me.cdid' };
18 my $search_str = Dumper($search);
19 my $attr_str = Dumper($attr);
21 my $rs = $schema->resultset("CD")->search($search, $attr);
23 is(Dumper($search), $search_str, 'Search hash untouched after search()');
24 is(Dumper($attr), $attr_str, 'Attribute hash untouched after search()');
25 cmp_ok($rs + 0, '==', 3, 'Correct number of records returned');