db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From T E Schmitz <mail...@numerixtechnology.de>
Subject Re: left outer join
Date Tue, 04 May 2004 09:49:06 GMT
Hello David, Thank you for your reply.

How did you map Torque objects to VIEWs as these wouldn't have been in 
the xml schema?

I haven't had any other suggestions but I noticed a posting on the 
Torque developers list: somebody has implemented explicit inner joins, 
left joins and right joins and offered to contribute his code.

Best Regards,

Tarlika Elisabeth Schmitz


David Hainlin wrote:

> Greetings, Don't know if you got your question answered, but the only 
> way I've done outer joins in Torque is to create a view and then map a 
> torque object to it.  Has worked pretty well.
> David
> 
>>> -----Original Message-----
>>> From: T E Schmitz <mailreg@numerixtechnology.de>
>>> To: Apache Torque Users List <torque-user@db.apache.org>
>>> Date: Sun, 02 May 2004 17:43:21 +0100
>>> Subject: left outer join
>>>
>>> I have 3 tables SECTION and BRAND and MODEL. SECTION is related to 
>>> BRAND and to MODEL via two foreign keys. I would like to select ALL 
>>> SECTIONs whether the FKs are null or not and fetch the BRAND and 
>>> MODEL attributes in one SQL statement. In other words I need a double 
>>> outer join:
>>>
>>> SELECT
>>> SECTION.SECTION_PK,
>>> SECTION.SECTION_NAME,
>>> SECTION.BRAND_FK,
>>> SECTION.MODEL_FK,
>>> BRAND.BRAND_NAME
>>> MODEL.MODEL_NAME
>>> FROM SECTION
>>> left outer join MODEL  on MODEL_PK =MODEL_FK
>>> left outer join BRAND  on BRAND_PK =BRAND_FK
>>>
>>> I have seen some old discussion threads from 2002 suggesting that 
>>> Torque does not support outer joins. Is this still the case?
>>>
>>> If so, can anyone suggest an efficient work-around? 

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


Mime
View raw message