[Dbix-class] clear prefetch in resultset.

brett gardner brett at clientcomm.com.au
Thu Jul 5 03:49:38 GMT 2007

Is there anyway to set prefetch to empty on a resultset that is created 

I have a method in my app that returns a resultset and 99% of the time I 
want a particular relationship to be prefetched. But in one particular 
instance I do not.

I am trying to call $rs->get_column('timestamp_entered')->min. But the 
query is barfing because it adds the prefetched relationship fields to 
the query.

I have tried $rs->search(undef,{prefetch=>undef}) but that does not seem 
to clear the prefetch, I have also tried 
$r->search(undef,{select=>'timestamp_entered'}) but it still adds the 
prefetched relationships fields.


More information about the Dbix-class mailing list