0 Replies Latest reply on Aug 30, 2007 12:54 PM by Jeremy Levy

    EJB-QL: LIMIT / OFFSET not working

    Jeremy Levy Newbie

      The following query, when deployed throws a parsing error:

      SELECT OBJECT(o)
      FROM Conversation o WHERE

      (o.toUserID = ?1 OR o.fromUserID= ?1) AND
      (o.toUserID = ?2 OR o.fromUserID = ?2)
      ORDER BY o.timestamp DESC OFFSET ?3 LIMIT ?4

      -------
      12:43:10,826 ERROR [ConversationBean#findByUsers] ::: Encountered "OFFSET" at line 6, column 27.
      Was expecting one of:

      "," ...
      --------

      As far as I can see I am using this correctly, any suggestions?

      J