X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FRow.pm;h=c6fd92386c08e63377945e70c2cbc8484167b366;hb=47d9646a1ef3d030d6a5456b0fa3d0a28a853e4a;hp=215790b906aadf7254db425b5e77aac4d015575e;hpb=dc5f0ad3eb36dbdcd1adfd2cb1b8655cd9c8310b;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Row.pm b/lib/DBIx/Class/Row.pm index 215790b..c6fd923 100644 --- a/lib/DBIx/Class/Row.pm +++ b/lib/DBIx/Class/Row.pm @@ -981,6 +981,9 @@ for example to rebless the result into a different class. Reblessing can also be done more easily by setting C in your Result class. See L. +Different types of results can also be created from a particular +L, see L. + =cut sub inflate_result { @@ -1026,7 +1029,6 @@ 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; @@ -1037,6 +1039,7 @@ sub inflate_result { } else { $class->throw_exception("Prefetch not supported with accessor '$accessor'"); } + $new->related_resultset($pre)->set_cache([ $fetched ]); } } return $new;