sql 语句转化成hql 求大神帮忙啊

select * from (select * from E_INFO_VIDEOS v,E_INFO i,E_INFO_CATE c where v.INFO_ID=i.id and i.id=c.INFO_ID
and i.fublishflag=1 and c.isdeleted=0 and v.videotype like '%政务信息%' order by i.sort desc,v.optime desc) where rownum <=10;

如何转化成hql

https://www.zhihu.com/question/28491211

你想取10条数据,sql进行了嵌套,是没有必要的
第一步执行Query
from model v,model i,model c where v.INFO_ID=i.id and i.id=c.INFO_ID
and i.fublishflag=1 and c.isdeleted=0 and v.videotype like '%政务信息%' order by i.sort desc,v.optime desc;

得到的query中使用setMaxResults方法
query.setMaxResults(10);