<bag name="tpaGenericFinancialHs" lazy="true">
<key>
<column name="SOURCE_CLAIM_NO"/>
<column name="PROCESS_RUN_ID"/>
</key>
<one-to-many
class="com.xxx.bossphase2.Financials" />
<loader query-ref="financial_sql_loader"/>
</bag>
<sql-query name="financial_sql_loader">
SELECT
fin.source_claim_no,
fin.process_run_id,
fin.claimant_no,
'ICP' AS transaction_type_cd, 'Claim_Payment' AS node_name,
SUM (fin.indemnity_paid_to_date) AS transaction_amt,
TO_CHAR (pro.as_of_finish_ts, 'YYYY-MM-DD') AS transaction_dt,
claim.data_source_cd
|| TO_CHAR (pro.execution_start_ts, 'YYYYMMDD') AS payee_nm,
SUM (fin.indemnity_paid_to_date) AS requested_payment_amt,
1 AS payment_type_cd,
TO_CHAR (pro.as_of_finish_ts, 'YYYY-MM-DD') AS check_dt,
SUM (fin.indemnity_paid_to_date) AS functional_currency_check_amt,
'USD' AS functional_currency_cd,
SUM (fin.indemnity_paid_to_date) AS payment_currency_check_amt,
'USD' AS payment_currency_cd
FROM tpa_wins_input_claim_h claim JOIN tpa_generic_financial_h fin
ON fin.source_claim_no = claim.source_claim_no
AND fin.process_run_id = claim.process_run_id
JOIN dta_process_run pro ON pro.process_run_id =
fin.process_run_id
WHERE fin.indemnity_paid_to_date > 0
and fin.process_run_id = ?
and fin.source_claim_no = ?
GROUP BY fin.source_claim_no,
fin.process_run_id,
fin.claimant_no,
claim.data_source_cd,
pro.as_of_finish_ts,
pro.execution_start_ts
<load-collection alias="Financials" role="com.xxx.bossphase2.TpaWinsInputClaimantH.tpaGenericFinancialHs" />
</sql-query>
yields the following exception:
[2008-08-05 14:29:55,916]DEBUG 609[main] - org.hibernate.type.NullableType.nullSafeSet(NullableType.java:133) - binding 'GAB2260968037' to parameter: 1 [2008-08-05 14:29:55,916]DEBUG 609[main] - org.hibernate.type.NullableType.nullSafeSet(NullableType.java:133) - binding '20748' to parameter: 2 [2008-08-05 14:29:55,947]ERROR 640[main] - org.hibernate.util.JDBCExceptionReporter.logExceptions(JDBCExceptionReporter.java:78) - ORA-01722: invalid number
%%%% Error Creating SessionFactory %%%%
org.hibernate.exception.SQLGrammarException: could not execute query
The order of the parameters 1 and 2 need to be switched. How do you switch the ordering of the bind parameters?
|