[jboss-user][JPQL EJBQL JBossQL] Problem with using "Limit" at JPQL subquery

zhangzehao zehao_zhang at asdc.com.cn
Thu Dec 11 00:00:26 EST 2008


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20081211/1e6da9ad/attachment.html 


More information about the jboss-user mailing list