I have a class B which extands class A. I am writing a HQL using these two classes. In B's mapping file i have only B's fields. When I execute the HQL A is replaced with B and I am getting exception that the field info is not found.
like
SELECT a,b,c
FROM
A a, B b, C c
Where
a.id = c.id
AND c.id = b.id
is interprated as
SELECT a,b,c
FROM
B a, B b, C c
Where
a.id = c.id
AND c.id = b.id
How do I mention in B's mapping file that A's info is in A's mapping? I can't change the class structure for any reason.
The hibernate version is 2.1.7
Thanks in advance.
|