[hibernate-users] [newbie] QuerySyntaxException: Path expected for join: non-mapped joins not possible?
Timo Nentwig
tnentwig at verisign.com
Tue Jan 16 09:14:32 EST 2007
Hello everybody,
is my understanding correct that I cannot join two arbitrary Objects/Tables which don't "know" each
other, i.e. neither one of them has a mapping to the other? Something which would look like this in SQL:
select * from table1 t1, table2 t2 where t1.id=t2.id;
When I try to do this in HQL
from table1 t1 inner join table2 t2 where t1.id=t2.id;
it throws an QuerySyntaxException: Path expected for join.
According to
http://forum.hibernate.org/viewtopic.php?t=969465&highlight=path+expected+join
http://forum.hibernate.org/viewtopic.php?t=964492&highlight=path+expected+join
this is indeed not possible but I've to explicitly ask.
Thanks a lot,
Timo
More information about the hibernate-users
mailing list