0 Replies Latest reply on Apr 4, 2003 5:35 PM by bbender

    declared-sql, hypersonic, "limit" keyword

    bbender Newbie

      Hi folks,

      I'm trying to do a smarter finder using Xdoclet's @jboss.declared-sql tag. What I've got for the bean is:
      * @jboss:declared-sql signature="java.util.Collection findWindowByVisibility(int start, int windowSize, java.lang.String sortBy, boolean visible)"
      * other="LIMIT {0} {1}"
      * where="visible={3}"
      * order="{2}"

      the jbosscmp-jdbc.xml snippet that gets generated for this is:
      <![CDATA[LIMIT {0} {1}]]>

      and the query that gets generated (I can see this in the exception ) is:
      SELECT serialNumber FROM TERMINAL WHERE visible=TRUE ORDER BY 'name' LIMIT 0 30

      Unfortunately, to be valid for the Hypersonic database that I'm currently using, the "LIMIT 0 30" has to be at the beginning, after the SELECT, not at the end (http://hsqldb.sourceforge.net/doc/hsqlSyntax.html#SELECT). Any quick _standard_ way to make JBoss do this? Or do I need to use a different data source or modify the JBoss source (yeah yeah, I know, "send a diff" -- I definitely would if I got it working this route).

      Thanks for any pointers,

      - Brian