posted 16 years ago
This is my use case :
I need to create an object from two Hibernate mapped classes .
ex:
class1 : a,b - mapped to a table
class2 : c,d - mapped to a table
class3: a,c - no mappings
I did something like "select new class3(class1.a,class2.c) from class1,class2)"
but hibernate is throwing error saying no class like class3. I know this is because class3 is not mapped (not in the resource file). So I have 2 qns :
1) Can I create a hbm file for class3 but not mapping to any table
2) If not, is there any way to get around this apart from creating a new table for class3.
Thanks,
Vivek.