8 use DBIC::SqlMakerTest;
11 my $schema = DBICTest->init_schema();
13 my $rs = $schema->resultset('CD')->search (
14 { 'tracks.id' => { '!=', 666 }},
15 { join => 'artist', prefetch => 'tracks' }
18 my $rel_rs = $rs->search_related ('tags');
23 SELECT tags.tagid, tags.cd, tags.tag
25 JOIN artist artist ON artist.artistid = me.artist
26 LEFT JOIN track tracks ON tracks.cd = me.cdid
27 LEFT JOIN tags tags ON tags.cd = me.cdid
28 WHERE ( tracks.id != ? )
30 [ [ 'tracks.id' => 666 ] ],
31 'Prefetch spec successfully stripped on search_related'