I’ve a class which has a lot of attributes(for e.g 25). Let’s say we have 5 groups each having 5 attributes as an arrangement. Each of these groups refers to a different table which has no relation whatsoever to the other tables for the other groups. Is it possible to do such a mapping in Hibernate?
class Test
{
string var1;
string var2;
string var3;
string var4;
string var5;
}
Table1:
Column:var1
Table2:
Column:var2
Table3:
Column:var3
Table4:
Column:var4
Table5:
Column:var5
Now I need to have a hibernate mapping (.hbm) file in which I need to map class test with table1,table2,table3,table4,table5. Is this possible to do?
It’s impossible. Impossible get values from differrent tables, without relationships. You can map one table on one entity or one entity on many tables using JOIN strategy. But you cann’t using JOIN without relationship. So this is impossible