Kevin Karabian <kkarab...@turnitin.com> writes: > Hi, > > Is there a way to store already retrieved related objects (related as a > has_many) in a result object, such that calling the accessor for that > relationship data will not hit the db again.
This is exactly what prefetch is for. https://metacpan.org/pod/DBIx::Class::ResultSet#prefetch https://metacpan.org/pod/DBIx::Class::ResultSet#PREFETCHING -- - Twitter seems more influential [than blogs] in the 'gets reported in the mainstream press' sense at least. - Matt McLeod - That'd be because the content of a tweet is easier to condense down to a mainstream media article. - Calle Dybedahl _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk