Hi,
I have a table that holds general fields, representing a generalization, and two holding specific fields, as they are specializations.
Mapping these entitites I wish to have the following class hierarchy
abstract class Person {
private String firstname;
private String lastname;
//getters & setters
}
class User extends Person {
private String username;
private String password;
//getters & setters
}
class Visitor extends Person {
private Date visitDate;
//getters & setters
}<class name="Payment" table="PAYMENT"> <id name="id" type="long" column="PAYMENT_ID"> <generator class="native"/> </id> <property name="amount" column="AMOUNT"/> ... <joined-subclass name="CreditCardPayment" table="CREDIT_PAYMENT"> <key column="PAYMENT_ID"/> <property name="creditCardType" column="CCTYPE"/> ... </joined-subclass> </class>
there is no inheritance info in the database and we don't have any reveng.xml construct for doing this.
Use mapping files if you want full control.