2 Replies Latest reply on Oct 10, 2003 1:43 AM by jcordes

    jboss-ql and Count(*)

    san121

      Dear friends,
      On going through the forum, i have learnt that we have 2 wait till jboss4.0 to have COUNT(*) in EJB-QL.

      I am using jboss 3.2.1 and is there a way out to use COUNT(*), using jboss-ql ? I've found from this forum that it is possible to have 'order by' working using jboss-ql. Can i do something similar for COUNT(*) as well?

      If it is not possible, could you suggest a workable solution for my CMP to use COUNT(*) querries.

      Thanks in advance
      sajeesh

        • 1. Re: jboss-ql and Count(*)
          tomsedlack

          You're right you'll have to wait for Count in CMP. But to solve your problem you can use BMP. Build a BMP Bean with a getCount method that gets a connection, performs an select count(*), then returns the count. Had to do this and it works fine...at least until we get what we want from CMP.

          • 2. Re: jboss-ql and Count(*)
            jcordes

            You can use the count function in JBoss-QL as of release JBoss-3.2.2RC4 (it returns a java.lang.Long).

            HTH,

            Jochen.