0 Replies Latest reply on Jan 23, 2003 8:15 AM by cnsxxx09

    ORDER BY  relations

    cnsxxx09

      Hi, (using JBoss3.0.4/JBossWeb)

      Is it possible to do ORDER BY using a related object?

      My JBoss QL is as follows:
      SELECT DISTINCT OBJECT(o) FROM Document o where
      (o.function.functionId BETWEEN ?1 AND ?2) ORDER BY
      o.function.functionId"

      This works if I leave off the ORDER BY clause, but when I add it I get the following exception which tells me very little:

      java.lang.ClassCastException: javax.ejb.FinderException

      Can this be done this way? If not how can I achieve such an ordering?

      TIA

      Chris
      -=-=-=