previously , this is how i map my "Activity" table. This table is storing CONTACT_ID and ACCOUNT_ID which link to Account and Contact table.
in this way
<many-to-one
name="accountObj"
class="my.com.miramax.crm.account.db.Account"
not-null="false"
not-found="ignore"
insert="false"
update="false"
column="ACCOUNT_ID"
/>
Now i have a table like below
this table doesn't store the ACCOUNT_ID and CONTACT_ID, but it separated into "Table_REF" and "REF_ID". For example , TABLE_REF = "Account" and REF_ID = 239 is same as the Account_ID = 239 in the Account table.
Can anyone tell me how do i map this table, so that i can differentiate them and use it in the DAO for searching ?
Please help me. Thanks in advance.