Hi, I just want to query the name attributes of two tables.
Code:
Select l.name, so.name
from countrymodel as l, unternehmensmodell as um, unternehmensmodellvst as umvst, steuerdaten as sd, steuerobjekt as so
where l.unternehmensmodell_id = um.id
and um.nachsteuerum_id = umvst.id
and umvst.steuerdatenunt_id = sd.id
and so.steuerdate_id = sd.id
But it returns l.name twice, instead of l.name, so.name.
What's wrong? How can I solve it.
By the way i can't use HQL, cause my web-frontend is designed for Sql only.
Thanks a lot.
Greetings Michael
PS: I'm using Hibernate 3.5.2 with PostgresSql 8.4.
Without hibernate the query works fine.
PPS:
Quote:
Select l.name, so.name as steuername
from countrymodel l, unternehmensmodell as um, unternehmensmodellvst umvst, steuerdaten sd, steuerobjekt so
where l.unternehmensmodell_id = um.id
and um.nachsteuerum_id = umvst.id
and umvst.steuerdatenunt_id = sd.id
and so.steuerdate_id = sd.id
Works, but why doesn't hibernate like the first one?