[Dbix-class] specify join type
Iain
iainhubbard at googlemail.com
Thu Feb 19 17:21:27 GMT 2009
On Thu, 2009-02-19 at 18:13 +0100, Bernhard Graf wrote:
> Nigel Metheringham wrote:
>
> > Not easily for a single query, however a relationship can have a
> > join_type attribute - relationship attributes are documented in
> > DBIx::Class::Relationship::Base under add_relationship
>
> I know this, but I actually wanted to use both join types.
>
> > You can always have 2 identical, other than the join_type attribute,
> > relationships defined under different names, to allow both forms of
> > joins to be performed as required...
>
> Good idea!
This is what we do, however we forgot to turn off cascading on the extra
relationship e.g.
{cascade_delete => 0, cascade_copy => 0, join_type => 'left'}
and it caused us all kinds of fun.
Iain.
More information about the DBIx-Class
mailing list