Hi all,

I was trying to push a query through parser today and it didn't make it.

"SELECT stt FROM SubTaskType stt ORDER BY ABS(stt.code) ASC"

Exception is below, my question being whether it is correct behaviour or a bug. I know mysql allows such syntax and oracle too (it allows numeric sorting of strings). I searched the code but those 10k lines are quite a challenge.

Regards,

Marek

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)

Reply via email to