Hi, all
I'll try to describe an extract of my class diagram:
Class Person: implements Subject and Contactable (that is, a person is a generic subject and is contactable - by mail, telephone, etc.)
Class Company: implements Contactable (that is, a company can have a telephone number an fax number etc)
Interface Subject.
Interface Contactable.
Class Contact: this is the implementation of a generic contact: an e-mail address, a telephone number, etc. This class references an object type Contactable.
I've mapped (in my hbm files) Person as a joined-subclass that extends Subject (Company is mapped in the same way too) and all works fine but, haw can i map Person so that it implements Contactable? I've to use joined-class? If yes how? If it is't the right way, how can i map it all?
That is, the final question is: How can i map, in hibernate, a class that implements two interfaces?
Many thanks
Giovanni
|