Hello
I don't know how to map an inheritance relationship based on a field which is not the primary key of the table of the subclass.
For example with the application CaveatEmptor on the inheritance beetween BillingDetails and CreditCard the hbm is :
Code:
<class name="BillingDetails" table="BILLING_DETAILS" lazy="true">
<id name="id" type="long"..... </id>
<property ......
<joined-subclass name="CreditCard" table="CREDIT_CARD">
[b]<key column="CREDIT_CARD_ID"
foreign-key="FK1_CREDIT_CARD_ID"/>[/b]
<property .......
But in the database if the relationship beetween BILLING_DETAILS and CREDIT_CARD is not on CREDIT_CARD_ID (Primary Key and also foreign Key) but on FK_BILLING_DETAILS, how can I do ?
I want CREDIT_CARD_ID as only a Primary Key not Foreign KEY too
and FK_BILLING_DETAILS as foreign Key.
Thanks for your help