X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fprefetch%2Fmanual.t;h=22281429fcf0095bef7ebf88d815b321bd4e09cb;hb=a5f2ccb49689cf2603ea5614b231088cb520734f;hp=1ad2253bff5afbd698ff9f06cf19b7581fe75bbf;hpb=6dd43920c45d7ae898f1bb902a086a9f99741976;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/prefetch/manual.t b/t/prefetch/manual.t index 1ad2253..2228142 100644 --- a/t/prefetch/manual.t +++ b/t/prefetch/manual.t @@ -63,7 +63,7 @@ my $rs = $schema->resultset ('CD')->search ({}, { { 'title' => 'me.title' }, # uniquiness for me { 'artist' => 'me.artist' }, # uniquiness for me ], - order_by => [{ -desc => 'cds.year' }, { -desc => 'me.title'} ], + order_by => [{ -desc => 'cds.year' }, { -desc => 'me.title'}, 'tracks.title', 'tracks_2.title' ], }); my $hri_rs = $rs->search({}, { result_class => 'DBIx::Class::ResultClass::HashRefInflator' }); @@ -220,29 +220,6 @@ lives_ok { my $dummy = $rs; warnings_exist { ], 'expected_warnings' } 'traversing prefetch chain with empty intermediates works'; -TODO: { -local $TODO = 'this does not work at all, need to promote rsattrs to an object on its own'; -# make sure has_many column redirection does not do weird stuff when collapse is requested -for my $pref_args ( - { prefetch => 'cds'}, - { collapse => 1 } -) { - for my $col_and_join_args ( - { '+columns' => { 'cd_title' => 'cds_2.title' }, join => [ 'cds', 'cds' ] }, - { '+columns' => { 'cd_title' => 'cds.title' }, join => 'cds', } - ) { - - my $weird_rs = $schema->resultset('Artist')->search({}, { - %$col_and_join_args, %$pref_args, - }); - - for (qw/next all first/) { - throws_ok { $weird_rs->$_ } qr/not yet determined exception text/; - } - } -} -} - # multi-has_many with underdefined root, with rather random order $rs = $schema->resultset ('CD')->search ({}, { join => [ 'tracks', { single_track => { cd => { artist => { cds => 'tracks' } } } } ],