Hi, I haven't tried it either, but you just define the view in the xml-schema and set the skipSQL attribute to "true". Then I guess Torque would generate classes but no SQL. Hope I'm able to help u this time :)
~Sarav -----Original Message----- From: T E Schmitz <[EMAIL PROTECTED]> To: Apache Torque Users List <[EMAIL PROTECTED]> Date: Tue, 04 May 2004 10:49:06 +0100 Subject: Re: left outer join 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 <[EMAIL PROTECTED]> >>> To: Apache Torque Users List <[EMAIL PROTECTED]> >>> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
