1 Reply Latest reply on Sep 5, 2002 10:03 PM by Frank Adcock

    JBossQL and LIMIT

    Guillaume Boissiere Newbie

      CMP gurus,

      I want to create a findBy... method for one of my CMP beans that would only return x rows, using the LIMIT keyword in PostgreSQL:

      public Collection findByStatus(int status, int limit)
      throws FinderException;

      SELECT Object(d) FROM delivery d
      WHERE d.status = ?0 LIMIT ?1

      I bought the JBoss-CMP documentation and I am under the impression that neither ejb-ql not JBossQL supports LIMIT.
      Is there another way to do this?

      If so, how can I make XDoclet automatically generate the appropriate ejb-jar.xml file for this query?

      Thanks in advance!

      -- Guillaume