prefetch/cache fixes for all but find
[dbsrgits/DBIx-Class-Historic.git] / lib / DBIx / Class / Row.pm
index f051629..2165801 100644 (file)
@@ -448,6 +448,7 @@ sub inflate_result {
         $fetched = $pre_source->result_class->inflate_result(
                       $pre_source, @{$pre_val});
       }
+      $new->related_resultset($pre)->set_cache([ $fetched ]);
       my $accessor = $source->relationship_info($pre)->{attrs}{accessor};
       $class->throw_exception("No accessor for prefetched $pre")
        unless defined $accessor;