2 Replies Latest reply on Oct 17, 2002 3:34 AM by Simone Bertoni

    Dynamic EJB-QL Order By does not work

    Frank Adcock Newbie

      I have the following EJB-QL (JBoss specific) with an Order By clause.

      SELECT DISTINCT OBJECT(num) FROM Numbers AS num WHERE num.phoneNumber >= ?1 AND num.phoneNumber <= ?2 ORDER BY num.phoneNumber ASC

      When the query executes as a normal jboss-ql query the sort order is fine.

      When the query executes as a dynamic-ql the data is always retrieved in the DESC order, regardless of the ORDER BY clause directive.

      Is this a bug, that anyone is aware of or should I lodge it (or on the off-chance I have made a mistake) can someone enlighten me as to the error of my ways.

      Regards