以前没有用过hibernate,配置hql时出错。
错误日志如下:
日志很多,挑重点看,crm_person is not mapped
看重点,如下:
<fields>a.id, (select z.corp.shortname from crmcorptyperelationship z where z.id = a.department), a.code, a.contracttype, a.name, a.createon, (select z.name from crm_person z where z.id = (select x.person.id from crmpersontyperelationship x where x.id =
a.createby)), a.datebegin, a.dateend, a.otherinfo, a.remark, a.approvestatus</fields>
hql,识别 类名,但是,不识别表名,所以报错 is not mapped,
修改crm_person 为crmperson ,类名,运行成功