* On Thu, Apr 10 2008, Shane Corgatelli wrote:
> I'm doing something similar:
>
>    $results = $schema->resultset('Resource')->find('X300002', 1, 1)
>      ->recurrence
>        ->search_related('dates');

DBIC could probably "optimize" this (different input, same programmer
intentions), but in the mean time:

  $schema->resultset('Resource')->
      search({  X3000002 ... })->
      related_resultset('recurrence')->
      related_resultset('dates');

This keeps the row object out of the picture (introduced by find in your
code), which probably saves a trip to the database.

Regards,
Jonathan Rockway      

-- 
print just => another => perl => hacker => if $,=$"

_______________________________________________
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/[EMAIL PROTECTED]

Reply via email to