The 'has-a' approach is what I'm currently working on. This should work fine, however there is one point on which I'm still confused.
The Chapter 16 of the Reference Doc states the following...
"Suppose we have an *interface* Payment..."
and proposes the following mapping
Code:
<class name="Payment" table="PAYMENT_ID">
<id/>
<discriminator column="PAYMENT_TYPE" type="string"/>
<property name="amount column="AMOUNT"/>
<subclass name="CreditCardPayment" discriminator-value="CREDIT"/>
<subclass name="CashPayment" discriminator-value="CASH"/>
<subclass name="ChequePayment" discriminator-value="CHEQUE"/>
</class>
Is this accurate? Can I specify an *Interface* as persistent? If so, what would my Configure.addClass() calls look like?
I just cannot get this to work.