[Dbix-class] Prefetch not supported with accessor 'multi'

Matt S Trout dbix-class at trout.me.uk
Thu Jul 26 21:21:48 GMT 2007


On Wed, Jul 25, 2007 at 11:21:14PM +0530, Ramprabhu Kaliaperumal wrote:
> Hi All
> I am getting this error
> 
> Caught exception in GlobalDC::C::Host->list 
> "DBIx::Class::ResultSet::all(): Prefetch not supported with accessor 
> 'multi' at /globaldc/web/dev11/catalyst/lib/GlobalDC/C/Host.pm line 173"
> 
> Here is my code
> 
>  my @hosts = $c->model('Local::Host')->search(
>    { -and => [{'problems.status' => ['error', 'warning']}, @search] },
>    {join => [qw/ problems /], select => 
> ['me.hostname','me.ip','me.console','me.escalation_group','problems.status'], 
> distinct => 1, order_by => 'hostname', cache => 1})->all;
> 
> 
> I am able to understand the error message.. Please help!

Rather than messing about with a custom select, why not just prefetch
'problems'?

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/             http://www.shadowcatsystems.co.uk/ 



More information about the Dbix-class mailing list