Add an as selector to a prefetch subquery to aid the subselecting-limit analyzer
Peter Rabbitson [Mon, 3 May 2010 16:33:14 +0000 (16:33 +0000)]
lib/DBIx/Class/Storage/DBIHacks.pm

index 32e0ea3..f16c935 100644 (file)
@@ -94,6 +94,8 @@ sub _adjust_select_args_for_complex_prefetch {
     }
 
     push @$inner_select, $sel;
+
+    push @{$inner_attrs->{as}}, $attrs->{as}[$i];
   }
 
   # construct the inner $from for the subquery