Hi,
we have a problem mapping a set. Imagine we have BillingDetails mapped with a joined-subclass as in JPwH 7.3.2
In the example the user has a set of BillingDetails like this:
Code:
<set name="billingDetails" inverse="true">
<key column="USER_ID"/>
<one-to-many class="BillingDetails"/>
</set>
But i want the user to have a set of CreditCards which is a subclass of BillingDetails.
Code:
<set name="creditCards" inverse="true">
<key column="USER_ID"/>
<one-to-many class="CreditCards"/>
</set>
This does not work. Hibernate is looking for a column "USER_ID" in the "CREDIT_CARD" table.
Is it possible to inform hibernate in some way that the key column refers to the table of the super class billing details instead of the table of the joined-subclass "CreditCard"?
Your help is very appreciated. Thanks for your attention.
kind regards
Janning