[rt-users] DBIx::SearchBuilder How to make left join with epression?

Todd Chapman todd at chaka.net
Mon Jul 31 12:50:42 EDT 2006

On Mon, Jul 31, 2006 at 12:34:11PM -0400, Jesse Vincent wrote:
> On Jul 28, 2006, at 5:21 PM, Todd Chapman wrote:
> >How do I do a left join and join on an 
> >arbitrary expression?
> >That catch is that I need to refer to the 
> >TABLE2 alias in
> >the expression?
> >
> Shouldn't it be enough to use ->NewAlias to 
> create a new alias, pass  it in as ALIAS2, and 
> go from there?
> What are you actually trying to do?

I am doing a LEFT join and my additional criteria
needs to be in the ON clause. And my criteria
needs to refer to the 'right' table?

With a left join SB requires TABLE2 instead
of ALIAS2.

Does this make sense?

> Best,
> Jesse
> >Also, how can I just give DBIx::SB the proper 
> >SQL to run
> >in situations where I can't get it to generate 
> >the proper
> >SQL?
> Inside of join conditions, not easily.
> Jesse

More information about the rt-users mailing list