david wrote:
Please show me the mapping that was generated. I personally use long or java.lang.Long types for integer keys. In anycase, there is a miss match here most likely in the types your using.
Hi David, please excuse the delay - doing several projects at once ;)
Here is the generated mappings file. See anything wrong with it?
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin 2.1
http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->
<class
name="com.ods_schema_mapping.hibernate.OdsCustomer"
table="ODS_TRANS_REPO"
>
<meta attribute="implement-equals" inherit="false">true</meta>
<composite-id name="comp_id" class="com.ods_schema_mapping.hibernate.OdsCustomerPK">
<key-property
name="transId"
column="TRANS_ID"
type="java.lang.Integer"
length="38"
/>
<key-property
name="transVersId"
column="TRANS_VERS_ID"
type="java.lang.Integer"
length="38"
/>
</composite-id>
<property
name="clearanceProductType"
type="java.lang.String"
column="CLEARANCE_PRODUCT_TYPE"
length="4"
/>
<property
name="repoCallInd"
type="java.lang.String"
column="REPO_CALL_IND"
length="1"
/>
<property
name="repoInterestNativeAmt"
type="java.lang.Integer"
column="REPO_INTEREST_NATIVE_AMT"
length="28"
/>
<property
name="repoLoanDayQty"
type="int"
column="REPO_LOAN_DAY_QTY"
length="5"
/>
<property
name="repoRateType"
type="java.lang.String"
column="REPO_RATE_TYPE"
length="1"
/>
<property
name="repoLoanRate"
type="java.lang.Integer"
column="REPO_LOAN_RATE"
length="27"
/>
<property
name="repoInterestAmt"
type="java.lang.Integer"
column="REPO_INTEREST_AMT"
length="28"
/>
<property
name="repoVariableInterest"
type="java.lang.Integer"
column="REPO_VARIABLE_INTEREST"
length="27"
/>
<property
name="repoOpenInd"
type="java.lang.String"
column="REPO_OPEN_IND"
length="1"
/>
<property
name="repoTradeType"
type="java.lang.String"
column="REPO_TRADE_TYPE"
length="3"
/>
<property
name="repoSpread"
type="java.lang.Integer"
column="REPO_SPREAD"
length="27"
/>
<property
name="processAddId"
type="java.lang.String"
column="PROCESS_ADD_ID"
not-null="true"
length="16"
/>
<property
name="processUpdateId"
type="java.lang.String"
column="PROCESS_UPDATE_ID"
not-null="true"
length="16"
/>
<property
name="stampAddDtime"
type="java.sql.Timestamp"
column="STAMP_ADD_DTIME"
not-null="true"
length="7"
/>
<property
name="stampUpdateDtime"
type="java.sql.Timestamp"
column="STAMP_UPDATE_DTIME"
not-null="true"
length="7"
/>
<!-- Associations -->
<!-- derived association(s) for compound key -->
<!-- end of derived association(s) -->
<!-- bi-directional one-to-one association to OdsTran -->
<one-to-one
name="odsTran"
class="com.ods_schema_mapping.hibernate.OdsTran"
outer-join="auto"
constrained="true"
/>
</class>
</hibernate-mapping>