X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fprefetch%2Fincomplete.t;h=4cfbdfcd9822c34a8c453f912a8c31313a2b1d8e;hb=27e0370da6cfee04a24491eaa4ce7aa5c878bafa;hp=781c1e1eacee7d08ab7fd605ddab773f7353a049;hpb=4e9fc3f33df616fb7340d05e304ff985b9cce9cb;p=dbsrgits%2FDBIx-Class.git diff --git a/t/prefetch/incomplete.t b/t/prefetch/incomplete.t index 781c1e1..4cfbdfc 100644 --- a/t/prefetch/incomplete.t +++ b/t/prefetch/incomplete.t @@ -109,4 +109,19 @@ throws_ok( 'Sensible error message on mis-specified "as"', ); +# check complex limiting prefetch without the join-able columns +{ + my $pref_rs = $schema->resultset('Owners')->search({}, { + rows => 3, + offset => 1, + columns => 'name', # only the owner name, still prefetch all the books + prefetch => 'books', + }); + + lives_ok { + is ($pref_rs->all, 1, 'Expected count of objects on limtied prefetch') + } "Complex limited prefetch works with non-selected join condition"; +} + + done_testing;