> From: [EMAIL PROTECTED]
> 
> Hello,
> I'm trying to do an OR with two joins and cant figure out how to do it
> using torque
> My original query is
> 
> select distinct items.item_id,items.small_image_id,items.large_image_id
> from items,images where images.image_id=items.small_image_id and
Should "and" on the above line be "or"?
> images.image_id=items.large_image_id
> 
> basically the items table has small_image_id and large_image_id both as FK
> to images table
> 
> Using Criteria is it possible to add two joins using an OR  ?

Look at the criteria-howto - the section that talks about Criteria.Criterion
will most likely do what you want.  Ref is:

    http://jakarta.apache.org/turbine/torque/criteria-howto.html

HTH,

Scott
-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to