I have not changed/customerised anything after middlegen created yet. This table is crazy that it doesn't have any PK.
That's why it is putting all the columns as composite_id in this .hbm.xml, I guess...
It is a bad design....I know, but I did not do it, I promise!
Appreciate any thoughts and suggestions!
<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin 2.1
http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->
<class
name="com.model.TblBankRate"
table="tblBankRates"
>
<composite-id>
<key-property
name="idAffiliate"
column="IdAffiliate"
type="java.lang.Integer"
length="10"
/>
<key-property
name="rateId"
column="rateID"
type="int"
length="10"
/>
<key-property
name="state"
column="state"
type="java.lang.String"
length="2"
/>
<key-property
name="bankName"
column="bankName"
type="java.lang.String"
length="80"
/>
</composite-id>
<!-- Associations -->
<!-- derived association(s) for compound key -->
<!-- end of derived association(s) -->
</class>
</hibernate-mapping>