Hi,
I wonder if it is possible to map one object to more than one database tables in Hibernate.
Problem is, there are 3 tables and they correspond to one object, differ in one or two column(s).
Record from table A can be moved to table B and vice-versa (subject to some condition/event).
Record from table A can be moved to table C and vice-versa (subject to some condition/event).
At the moment I am working it with 3 POJOs and 3 mapping files. I couldn’t design it properly by making use of inheritance / interface. So making use of conversion methods.
Will be thankful if one could give some pointer in better design/solution. Further, I can’t change the tables.
Thanks
Hibernate version:Hibernate-3.1beta3
|