9 my $schema = DBICTest->init_schema();
11 my $rs = $schema->resultset ('CD')->search ({}, {
12 join => [ 'tracks', { single_track => { cd => { artist => { cds => 'tracks' } } } } ],
15 { 'year' => 'me.year' }, # non-unique
16 { 'genreid' => 'me.genreid' }, # nullable
17 { 'tracks.title' => 'tracks.title' }, # non-unique (no me.id)
18 { 'single_track.cd.artist.cds.cdid' => 'cds.cdid' }, # to give uniquiness to ...tracks.title below
19 { 'single_track.cd.artist.artistid' => 'artist.artistid' }, # uniqufies entire parental chain
20 { 'single_track.cd.artist.cds.year' => 'cds.year' }, # non-unique
21 { 'single_track.cd.artist.cds.genreid' => 'cds.genreid' }, # nullable
22 { 'single_track.cd.artist.cds.tracks.title' => 'tracks_2.title' }, # unique when combined with ...cds.cdid above
23 { 'latest_cd' => { max => 'cds.year' } }, # random function
24 { 'title' => 'me.title' }, # uniquiness for me
25 { 'artist' => 'me.artist' }, # uniquiness for me
27 result_class => 'DBIx::Class::ResultClass::HashRefInflator',
30 use Data::Dumper::Concise;
31 die Dumper [$rs->all];