9 use DBIC::SqlMakerTest;
10 use Data::Query::ExprDeclare;
12 my $schema = DBICTest->init_schema();
14 my $cds = $schema->resultset('CD');
16 my $restricted = $cds->search({}, { cache => 1, grep_cache => 1 })
17 ->search({ 'me.artist' => 1 });
19 is($restricted->count, 3, 'Count on restricted ok');
21 $restricted = $cds->search(
23 { prefetch => 'artist', cache => 1, grep_cache => 1 }
25 ->search({ 'artist.name' => 'Caterwauler McCrae' });
27 is($restricted->count, 3, 'Count on restricted ok via join');