X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBIHacks.pm;h=9f2a623758dfdc2309f810e0ac85e8260c0714e0;hb=fe0708a2d68b5d34b6bc6f7e70164c3e569f1dd0;hp=ec6a32f779ec45e0f66766b7c119c926759f4679;hpb=5f11e54f1dc812354b8d160d5b286502cc227cbf;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBIHacks.pm b/lib/DBIx/Class/Storage/DBIHacks.pm index ec6a32f..9f2a623 100644 --- a/lib/DBIx/Class/Storage/DBIHacks.pm +++ b/lib/DBIx/Class/Storage/DBIHacks.pm @@ -84,7 +84,7 @@ sub _adjust_select_args_for_complex_prefetch { # bring over all non-collapse-induced order_by into the inner query (if any) # the outer one will have to keep them all delete $inner_attrs->{order_by}; - if (my $ord_cnt = @{$outer_attrs->{order_by}} - @{$outer_attrs->{_collapse_order_by}} ) { + if (my $ord_cnt = @{$outer_attrs->{order_by}} - @{$outer_attrs->{_collapse_order_by}||[]} ) { $inner_attrs->{order_by} = [ @{$outer_attrs->{order_by}}[ 0 .. $ord_cnt - 1] ];