Cayenne
  1. Cayenne
  2. CAY-1588

Add support for functions in ORDER BY statement to EJBQL parser

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.0.3
    • Labels:
    • Environment:
      Ubuntu Natty, OpenJDK U26, Tomcat 6.0.26

      Description

      Currently Cayenne lacks support for functions in ORDER BY statement in it's EJBQL implementation. This is request for extending grammar and allowing expressions like ... ORDER BY ABS(code) which as it seems are part of JPA spec now.

      Link to primal discussion: http://cayenne.195.n3.nabble.com/EJBQL-parser-td3159392.html

        Activity

        Marek Šabo created issue -
        Hide
        Marek Šabo added a comment -

        Raised exception:

        Caused by: org.apache.cayenne.ejbql.parser.ParseException: Encountered " "ABS" "ABS "" at line 1, column 42.
        Was expecting one of:
        <IDENTIFIER> ...
        "db:" ...

        at org.apache.cayenne.ejbql.parser.EJBQL.generateParseException(EJBQL.java:9418)
        at org.apache.cayenne.ejbql.parser.EJBQL.jj_consume_token(EJBQL.java:9297)
        at org.apache.cayenne.ejbql.parser.EJBQL.path(EJBQL.java:623)
        at org.apache.cayenne.ejbql.parser.EJBQL.orderby_item(EJBQL.java:5138)
        at org.apache.cayenne.ejbql.parser.EJBQL.orderby_clause(EJBQL.java:5097)
        at org.apache.cayenne.ejbql.parser.EJBQL.select_statement(EJBQL.java:93)
        at org.apache.cayenne.ejbql.parser.EJBQL.parseQuery(EJBQL.java:41)
        at org.apache.cayenne.ejbql.parser.EJBQL$EJBQLDefaultParser.compile(EJBQL.java:30)

        Show
        Marek Šabo added a comment - Raised exception: Caused by: org.apache.cayenne.ejbql.parser.ParseException: Encountered " "ABS" "ABS "" at line 1, column 42. Was expecting one of: <IDENTIFIER> ... "db:" ... at org.apache.cayenne.ejbql.parser.EJBQL.generateParseException(EJBQL.java:9418) at org.apache.cayenne.ejbql.parser.EJBQL.jj_consume_token(EJBQL.java:9297) at org.apache.cayenne.ejbql.parser.EJBQL.path(EJBQL.java:623) at org.apache.cayenne.ejbql.parser.EJBQL.orderby_item(EJBQL.java:5138) at org.apache.cayenne.ejbql.parser.EJBQL.orderby_clause(EJBQL.java:5097) at org.apache.cayenne.ejbql.parser.EJBQL.select_statement(EJBQL.java:93) at org.apache.cayenne.ejbql.parser.EJBQL.parseQuery(EJBQL.java:41) at org.apache.cayenne.ejbql.parser.EJBQL$EJBQLDefaultParser.compile(EJBQL.java:30)

          People

          • Assignee:
            Unassigned
            Reporter:
            Marek Šabo
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development