3 Replies Latest reply on Mar 17, 2004 5:41 PM by juha

    unable to use ORDER BY clause

    Daniel Du Newbie

      Platform: Jbuilder 9

      i have to sort data by one column in a CMP.
      though i copy following statements from ejb-jar.xml to jbosscmp-jdbc.xml,
      these statements disappear after i rebuild the application.

      <ejb-ql>SELECT OBJECT(i) FROM TblWebInfo AS i WHERE i.infoTypeID=?1 ORDER BY i.pbulishTime DESC</ejb-ql>

      and system throws following information:
      actually that ejb-ql is used for another table, not TblWebProduct.

      Depends On Me: , ObjectName: jboss.j2ee:jndiName=TblWebProduct,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: Error compiling ejbql;
      - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountere
      d "ORDER" at line 1, column 61.
      Was expecting one of:

      "AND" ...
      "OR" ...
      "+" ...
      "-" ...
      "*" ...
      "/" ...

      then how i can use ORDER BY clause in JBoss under Jbuilder9?
      I am appreciated if you can give me piece of advice.