[Dbix-class] Fine-tuning of prefetched relationships

Shea Levy shea.levy at logicblox.com
Mon Apr 1 12:43:43 GMT 2013


Hi all,

In my db, a Project has many Jobs. I have a query on Projects where I =

want to:

 1. Sort the jobs of each project by a particular column on the Jobs table
 2. Only include jobs that satisfy some criterion, without excluding
    projects where no such jobs exist (i.e. add a condition to JOIN ON,
    not WHERE)

Are either of these possible with a single search on Projects? Currently =

we're breaking it up into two queries.

Thanks,
Shea Levy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20130401/a4d=
2a32a/attachment.htm


More information about the DBIx-Class mailing list