Hibernate version: 3.1.3
Hello,
I want to use 'Mixing table per class hierarchy with table per subclass' (see reference document :
Code:
<class name="Payment" table="PAYMENT">
<id name="id" type="long" column="PAYMENT_ID">
<generator class="native"/>
</id>
<discriminator column="PAYMENT_TYPE" type="string"/>
<property name="amount" column="AMOUNT"/>
...
<subclass name="CreditCardPayment" discriminator-value="CREDIT">
<join table="CREDIT_PAYMENT">
<property name="creditCardType" column="CCTYPE"/>
...
</join>
</subclass>
<subclass name="CashPayment" discriminator-value="CASH">
...
</subclass>
<subclass name="ChequePayment" discriminator-value="CHEQUE">
...
</subclass>
</class>
But I can't because <join> doesn't accept <set> or <bag>, that I really need.
I can't also use joined-subclass because one of my subclasses has no more attribute than the class, and I don't want to create a new table for only an id.
So do you have any suggestion?
Thanks a lot
Cathy