Anyone?

********************************************
Steve Ebersole
IT Integration Engineer
Vignette Corporation 
512.741.4195

Visit http://www.vignette.com

********************************************


-----Original Message-----
From: Ebersole, Steven [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 22, 2002 3:25 PM
To: [EMAIL PROTECTED]
Subject: [castor-dev] Unexplainable results in SQL generation from
mapping


Can someone please point out to me what is wrong with the following mapping
snippet:

        <field name="forecastedAmount.number" type="double">
            <sql name="TOT_AMT" many-key="OPP_ID"
many-table="V_OPP_FORECASTED_AMOUNTS"/>
        </field>
        <field name="forecastedAmount.currency"
type="com.vignette.it.apps.jdo.CurrencyImpl">
            <sql name="TOT_CURR_ID" many-key="OPP_ID"
many-table="V_OPP_FORECASTED_AMOUNTS"/>
        </field>

Leads to the following query statement (from castor debug logs):
SELECT "OPPORTUNITY"."NAME",
       "OPPORTUNITY"."COMP_ID",
       "OPPORTUNITY"."ORG_ID",
       "OPPORTUNITY"."PROJ_CLOSE_DT",
       "OPPORTUNITY"."SS_ID",
       "OPPORTUNITY"."FORECAST_DESIGNATION_ID",
       "OPPORTUNITY"."OPP_ASSESSMENT_ID",
       "V_OPP_FORECASTED_AMOUNTS"."TOT_CURR_ID",
       "OPPORTUNITY"."TOT_AMT",
       "OPP_TECH_ENV_JT"."TECH_ENV_ID",
       "OPPORTUNITY"."ACTIVE_FLG",
       "OPPORTUNITY"."CRTD_DT",
       "OPPORTUNITY"."CRTD_BY",
       "OPPORTUNITY"."CHGD_DT",
       "OPPORTUNITY"."CHGD_BY"
FROM "V_OPP_FORECASTED_AMOUNTS","OPPORTUNITY","OPP_TECH_ENV_JT"
WHERE "OPPORTUNITY"."OPP_ID"="V_OPP_FORECASTED_AMOUNTS"."OPP_ID"(+)
  AND "OPPORTUNITY"."OPP_ID"="OPP_TECH_ENV_JT"."OPP_ID"(+)



The currency part actually gets mapped correctly in the SQL statement
("V_OPP_FORECASTED_AMOUNTS"."TOT_CURR_ID"), but, for some reason I have
failed to see, Castor thinks it should find the TOT_AMT column on the
OPPORTUNITY table ("OPPORTUNITY"."TOT_AMT") even though I just told it to
look on V_OPP_FORECASTED_AMOUNTS.   ?????


Thanks for any help.



********************************************
Steve Ebersole
IT Integration Engineer
Vignette Corporation 
512.741.4195

Visit http://www.vignette.com

********************************************

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to