JBoss-4.2.3.GA / Eclipse 3.4 with JBoss Tools
2.12.GA / PostgresQL 8.1 / JDK 1.6
I want using Limit in my JPQL subquery :
"select questions "
+
"from Question questions "
+
"where questions in ( SELECT questions
" +
"FROM questions "
+
"WHERE questions.typeBean.typeId IN (
:typeId ) " +
"AND
questions.questionTypeBean.questionTypeId IN ( :questionTypeId ) "
+
"ORDER BY random() Limit ( :limit
) ) " +
"ORDER BY
questions.questionFlag "
"random()" can be used, but "Limit" is
useless, and I found org.jboss.ejb.plugins.cmp.ejbql.ASTLimitOffset at
jboss.jar, how could I using "Limit" ? And, is "random()" is supported by jboss
or other one ?
Best regards,
Zhang
ZeHao