hibernate 连接接我就不多说了,这方面的资料多的很,我这里就总结一下我的问题,下面是我的HQL语句:
select d.vchname,d.vchtype,d.cstate,e.vchroleName,e.vchchecklogin from WgUnioninfo t left join t.wgUnionpeoples d, WgRoleinfo e where t.id=? and d.numroleid=e.id,如果把left join 改为 left join fetch,上面的这个语句就会报错了,hibernate 延迟加载为flase时,再取对象属性就会报错了。
select d.vchname,d.vchtype,d.cstate,e.vchroleName,e.vchchecklogin from WgUnioninfo t left join t.wgUnionpeoples d, WgRoleinfo e where t.id=? and d.numroleid=e.id,如果把left join 改为 left join fetch,上面的这个语句就会报错了,hibernate 延迟加载为flase时,再取对象属性就会报错了。