dear all
i have a legacy system, so i need write some sql command,
i execute sql from mysql shell mode, i can get correct result
"unit1 level1 type1 city1" <-it's correct
but when i use hibernate session.createSQLQuery(sql).list()
i got this
"unit1 level1 level1 level1" <-it's different!!!!
i use the same sql command, but i got the different result
What am I doing wrong?
sql is
select
u.unitname, c1.subdesc, c2.subdesc, c3.subdesc
from
unit u, commentd c1, commentd c2, commentd c3
where
c1.maincode='UnitLevel' and c1.subcode=u.unitlevel
and c2.maincode='UnitType' and c2.subcode=u.unittype
and c3.maincode='CityNo' and c3.subcode=u.cityno"
Hibernate version:3.1.3
database:mysql 5
|