hql语句帮我写下·
yyxh520
2010-04-27
String hql="from ArticleInfo one limit 0.20;
Session session=HibernateSessionFactory.getSession();
Transaction tt=session.beginTransaction();
list=session.createQuery(hql).list();
tt.commit();
session.close();
unexpected token: limit near line 1, column 25 [from po.ArticleInfo one limit 0,20]
怎么写语句才对啊??
|
|
moonights
2010-04-28
hql不支持limit
String sqlQuery="from ArticleInfo one"; Query query=session.createQuery(sqlQuery); query.setFirstResult(0); query.setMaxResults(20); |
|
Joshuarsdgfpwee
2010-04-28
[/url][url][url][/url]
|