Hmm ... a lot of times it is useful to program to interfaces. And when doing this you would also like to have this interface mappable. Otherwise you cannot use it as a field reference in another Hibernate entity. Since annotation figure the type from returned class type. Or is there a way to tell to which mappable entity our field maps to?
For example:
Code:
private Payable payment; //interface
@Column(name="payment_id")
public Payable getPayment() {
return payment;
}
But the actual mapped entity is AbstractPayable (since this one is an object, not an interface). How would I pass this information to the @Column annotation?
Since I might use this Payable interface in some other un mapped object and assign him a nonpresistent implementation.
Just thinking outloud ...
Rgds, Ales