[Dbix-class] has_many LEFT JOIN with parameter

David Ihnen davidihnen at gmail.com
Fri May 6 18:08:13 GMT 2011


It wasn't in the code version they had when I was encountering that issue...
we used a workaround where we defined queries manually and called them to
fulfill that purpose... I think it might be related to the ability of
SQL::abstract to work with that kind of expression.

Newer code versions might allow it... but I think it was more fundamental
than something that could be fixed with a minor revision.

On Fri, May 6, 2011 at 12:50 PM, Ton Voon <tonvoon at gmail.com> wrote:

> Hi!
>
> Is it possible to have a has_many relationship where the LEFT JOIN ON
> relationship contains a parameter? For instance, something like in User.p=
m:
>
> __PACKAGE__->has_many( "useraccounts", "UserAccounts", { "foreign.userid"
> =3D> "self.id", "foreign.accountid" =3D> $value }, { join_type =3D> "left=
" } );
>
> Where $value can be specified as part of the search for the ON condition.
>
> Is this possible?
>
> Ton
>
>
> _______________________________________________
> 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/dbix-class@lists.scsys.co.uk
>



-- =

David Ihnen
Voice contact (562) 743-1807
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20110506/fc3=
72250/attachment.htm


More information about the DBIx-Class mailing list