[Dbix-class] Outer Joins

Todd Holbrook todd at dreamtheorystudios.com
Thu Sep 18 01:14:24 BST 2008


On Wed, Sep 17, 2008 at 12:44 PM, Karen Hoofnagle <karen at hoofnagle.org>wrot=
e:

> I need to perform a whole stack of left outer joins and include data from
> multiple tables in the results.
> I've found the from clause documentation in ResultSet, so I know I can
> force my own join setup if I must, but the docs do point out that this is
> subverting the framework and should only be used after you've exhausted t=
he
> in-framework options.
> Have I just completely missed something in the documentation? How does one
> set up a left outer join within the usual working constraints of
> DBIX::Class?
> Here's hoping someone is going to throw me the URL I'm missing and an
> "RTFM!"
>

Have a look at the "join_type" attribute on relationships.  See the bottom
of:
http://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/Relationship.=
pm#belongs_to
I've successfully used a join type of "left outer": { join_type =3D> 'left
outer' }

Todd
-- =

Todd Holbrook
Dream Theory Studios
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20080917/ba5=
98bcc/attachment.htm


More information about the DBIx-Class mailing list