2 Replies Latest reply on Jan 11, 2004 10:40 AM by Gokhan Demir

    EJB-QL limitations

    Gokhan Demir Newbie

      Hi,

      I wonder why JBoss has a limited support on a limited spec? My concern is keeping an existing enterprise application deployable to multiple servers. So, I would like to use my queries in ejb-jar on every platform. It is frustrating for me to see JBoss simply does not parse between, >= and <= operators.

      Will there be support for these operators in the future releases?

      Regards,
      Gokhan

        • 1. Re: EJB-QL limitations
          Juha Lindfors Master

          From EJBQLParser.jjt:

          void ComparisonExpression() #void :
          {}
          {
           (
           StringValue()
           (
           <EQ> { jjtThis.opp="="; } |
           <NE> { jjtThis.opp="<>"; }
           )
           StringExpression()
           ) #StringComparison
          |
           (
           BooleanValue()
           [
           (
           <EQ> { jjtThis.opp="="; } |
           <NE> { jjtThis.opp="<>"; }
           ) BooleanExpression()
           ]
           ) #BooleanComparison
          |
           (
           DatetimeValue()
           (
           <EQ> { jjtThis.opp="="; } |
           <GT> { jjtThis.opp=">"; } |
           <LT> { jjtThis.opp="<"; } |
           <NE> { jjtThis.opp="<>"; }
           )
           DatetimeExpression()
           ) #DatetimeComparison
          |
           (
           EntityBeanValue()
           (
           <EQ> { jjtThis.opp="="; } |
           <NE> { jjtThis.opp="<>"; }
           )
           EntityBeanExpression()
           ) #EntityComparison
          |
           LOOKAHEAD(ArithmeticValue() ( <EQ> | <GT> | <GE> | <LT> | <LE> | <NE> ) )
           (
           ArithmeticValue()
           (
           <EQ> { jjtThis.opp="="; } |
           <GT> { jjtThis.opp=">"; } |
           <GE> { jjtThis.opp=">="; } |
           <LT> { jjtThis.opp="<"; } |
           <LE> { jjtThis.opp="<="; } |
           <NE> { jjtThis.opp="<>"; }
           )
           SingleValueDesignator()
           ) #ArithmeticComparison
          |
           BetweenExpression()
          }
          


          Care to expand what in the EJB-QL is not supported?


          • 2. Re: EJB-QL limitations
            Gokhan Demir Newbie

            Hi,

            SELECT OBJECT(o) FROM Holiday AS o WHERE o.hdate BETWEEN ?1 AND ?2

            or

            SELECT OBJECT(o) FROM Holiday AS o WHERE o.hdate >= ?1 AND o.hdate <= ?2

            Both give parse errors, the error indicate JBoss parser was expecting either >, <, =, <>. But strangely, the parser is not expecting BETWEEN, >= or <=. Why is this? Such an impressive server with impressive implementation novelties, but does not support the EJB-QL fully.

            JBoss 3.2.3, jdk 1.4.2_03, Linux.