db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fox <Thomas....@seitenbau.net>
Subject Re: Torque LEFT JOIN with multiple clauses
Date Sat, 02 Jun 2012 14:52:04 GMT
Thomas Vandahl wrote:
> On 19.05.12 18:08, Graham Leggett wrote:
> > Hi all,
> >
> > From what I can see, torque currently is unable to support the
> following kind of join containing multiple clauses:
> >
> > SELECT ... FROM a LEFT JOIN b ON a.id = b.id AND b.foo IS NULL ...
> >
> > Is this possible in torque 4 as yet? Just want to check before I
> create a patch that this isn't supported already and I've missed it.
> Some extensions have been done, see
> https://issues.apache.org/jira/browse/TORQUE-7 However, I don't think
> that multiple clauses are supported right now.

No, they aren't. The curren implementation is you can use one condition but
choose the operator.

If you want to create a patch for this, I'd advocate to use a
org.apache.torque.criteria.Criterion to hold the join clause  for the most
general approach.
You can look at the TORQUE-7 svn commit log to see the places to modify
(unfortunately, some Torque.properties were modified  inadvertently in this
commit, please ignore those). You can probably use the
org.apache.torque.sql.SqlBuilder.appendCriterion(Criterion, Criteria, DB,
StringBuilder, Database, Query) method for SQL generation for the


To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message