Hi All,
I am in the process of migrating a piece of Java code to use Hibernate version 3.
I have a peculiar problem.
I want to map a table to two different classes for selected fields. i.e.
Code:
Table Name: Repair Table
-------------------------------
Job_Id
Job_date
Repair_Details
Class Name: JobCommon
-------------------------------
Job_Id
Job_Date
Class Name: Repair
----------------------------
Job_Id
Repair_Details
Both JobCommon and Repair class need to be mapped to the specific fields in table Repair as shown above.
Is it possible to do that in Hibernate? I have searched around and found that you can map 1 class to multiple tables but not vice-versa.
Please can anyone share some insights on how to approach this problem?
Thanks