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

    ORDER BY  relations

    Chris Newbie

      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

      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?