X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=blobdiff_plain;f=t%2Fprefetch%2Fmanual.t;h=7a2224521659dbe29168763cfed991813555aa10;hp=72bde38af49b80b8d61c02404394dd546d30fa3d;hb=4e9fc3f33df616fb7340d05e304ff985b9cce9cb;hpb=908aa1bb761ec1da5c061fe9f687598e3f1934bc diff --git a/t/prefetch/manual.t b/t/prefetch/manual.t index 72bde38..7a22245 100644 --- a/t/prefetch/manual.t +++ b/t/prefetch/manual.t @@ -203,4 +203,27 @@ TODO: { is ($rs->cursor->next, undef, 'cursor exhausted'); +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/; + } + } +} +} + done_testing;