I'm interested to find out whether it's possible to map a single class to multiple tables using Hibernate.
e.g. mapping Employee.java to multiple tables such as PERSON [holds details such as name, employee id, etc] and CONTACT_DETAILS [holds info such as address, telephone number etc]
Looking through the reference hibernate documentation, I've come across the entity-name attribute, but am not sure how this fits in.
It's not possible to combine the tables into a single table and thereby exploit the 'component' feature, since this is the schema that's been dictated to us.
Thanks in advance,
regards,
Mo
e.g. mapping Employee.java to multiple tables such as PERSON [holds details such as name, employee id, etc] and CONTACT_DETAILS [holds info such as address, telephone number etc]
Looking through the reference hibernate documentation, I've come across the entity-name attribute, but am not sure how this fits in.
It's not possible to combine the tables into a single table and thereby exploit the 'component' feature, since this is the schema that's been dictated to us.
Thanks in advance,
regards,
Mo