dannyhoult wrote:
when you say the queries don't work, what error message are you getting?
The message is either: Cannot Execute SQL
or: unexpected token: B
or: missing path statement
dannyhoult wrote:
also post your mapping files so I can see the fields you're using to join the tables with.
Class A has no reference to B or C
A join either B on A or C on A works, it is just the problem when I want to join all 3 tables, so:
A: no ref to either B or C
B: <many-to-one class="A".../>
C: <many-to-one class="A".../>
There should nothing be wrong with the mapping files since they work:
in the DB it is like:
B has foreign key to A.Id
C has foreign key to A.Id
A has no ref to either
Hope that clarifies...
Actually I thing I will just use SQLQuery for it does not seem that HQL can handle this case - no such case in the docs anyway...
Cheers, Arndt