问题描述
写hql语言查询数据库的时候,数据库中有个字段名是properties,并且这个语句要多表联立,在select 的时候就会出现 类似 h.properties 这种,查询就会报错, 猜想是hql中把 h.properties当成一个文件或者解读成其他东西了,有大佬解释一下吗?
代码片段
select new shgjj.yddk.query.vo.QueryVO(sc.id,sc.status,lt.kind,lt.amount,sc.no,sc.syssource,d.name,u.name,lt.amortizingmode,lt.isfirstloan, ld.period,ld.bookingno,h.typeex,h.kind,h.address,h.region,h.ring,h.acreage,h.unitprice,h.totalprice,h.properties,h.isimprove,p.yearpayability,h.houseyear,sc.netsigndate from ServicecasesEntity sc,LoantransEntity lt,LoandetailsEntity ld,HousesEntity h,PersonsEntity p,DepartmentsEntity d,UsersEntity u where sc.id = lt.servicecaseid and lt.id = ld.loantranid and sc.id = h.servicecaseid and sc.id = p.servicecaseid and sc.orgbranchid = d.id and sc.userid = u.id and p.type = 1 and ld.kind = 1 and sc.id =:id