4 Replies Latest reply on Jan 6, 2004 2:46 AM by juha

    ">=" and "<=" not supported in jboss/EJB-QL?

    zorzella

      If I try to use "<=" at an EJB-QL query, I get an error message (below). AFAIK, this is supposed to work. Doesn't jboss support it? jboss 3.2.1

      *********** ERROR ************
      [...] Encountered "<=" at line 1, column 79.
      Was expecting one of:
      ">" ...
      "<" ...
      "=" ...
      "<>" ...
      *********** ERROR ************

      Zorzella

        • 1. Re:

          IIRC, they're only supported by a limited set of datatypes in EJBQL. What types are you trying to compare, and have you tried using JBossQL instead? What does your query look like?

          • 2. Re:
            zorzella

            I'm trying to compare "java.util.Date".

            The query is:

            SELECT Object(Ob) FROM Obs as Ob WHERE Ob.establishedAt < ?1

            The getter is:

            public abstract Date getEstablishedAt ();

            Zorzella

            • 3. Re:
              zorzella

              Note: the query, as posted, works. It's when I change <= for < that problems arise.

              • 4. Re:

                Yes, you have to use JBossQL if you want to use the <= or >= operators with dates.