HQL怎么使用union all和order by

select   *   from   (select companyInfo.subject,companyInfo.guId from CompanyInfo  companyInfo  where companyInfo.type='企业动态'  order by companyInfo.startDate desc  ) a  union all  select   *   from   (select infos.subject,infos.guId from Infos  infos,Category  category  where category.categoryName='园区动态' and infos.categoryId=category.guId order by infos.startDate desc ) b  

这段sql怎么改成hql啊 谢谢

你可能感兴趣的:(hibernate)