openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Everton (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-232) concat function in EJB QL doesn't nest
Date Wed, 02 May 2007 00:02:15 GMT
concat function in EJB QL doesn't nest
--------------------------------------

                 Key: OPENJPA-232
                 URL: https://issues.apache.org/jira/browse/OPENJPA-232
             Project: OpenJPA
          Issue Type: Bug
          Components: jpa
    Affects Versions: 0.9.7
         Environment: Using H2 as the target SQL dialect.
            Reporter: Dan Everton


I'm attempting to do a case insensitive search for a substring within the concatenation of
two columns. The EJB QL I came up with looks like this:

where lower(concat(concat(e.firstname, ' '), e.surname))) like concat(lower(:name), '%')

however trying to execute that results in the following parse exception. 

Caused by: <0.0.0 nonfatal user error> org.apache.openjpa.persistence.ArgumentException:
Encountered "lower ( concat ( concat ( e . firstname , \' \' ) , e . surname ) ) )" at character
32, but expected: ["(", ")", "+", ",", "-", ".", ":", "<", "<=", "<>", "=", ">",
">=", "?", "ABS", "ALL", "AND", "ANY", "AS", "ASC", "AVG", "BETWEEN", "BOTH", "BY", "CONCAT",
"COUNT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "DELETE", "DESC", "DISTINCT",
"EMPTY", "ESCAPE", "EXISTS", "FETCH", "FROM", "GROUP", "HAVING", "IN", "INNER", "IS", "JOIN",
"LEADING", "LEFT", "LENGTH", "LIKE", "LOCATE", "LOWER", "MAX", "MEMBER", "MIN", "MOD", "NEW",
"NOT", "NULL", "OBJECT", "OF", "OR", "ORDER", "OUTER", "SELECT", "SET", "SIZE", "SOME", "SQRT",
"SUBSTRING", "SUM", "TRAILING", "TRIM", "UPDATE", "UPPER", "WHERE", <BOOLEAN_LITERAL>,
<DECIMAL_LITERAL>, <IDENTIFIER>, <INTEGER_LITERAL>, <STRING_LITERAL>].
	at org.apache.openjpa.kernel.jpql.JPQL.generateParseException(JPQL.java:9322)
	at org.apache.openjpa.kernel.jpql.JPQL.jj_consume_token(JPQL.java:9199)
	at org.apache.openjpa.kernel.jpql.JPQL.conditional_primary(JPQL.java:1895)
	at org.apache.openjpa.kernel.jpql.JPQL.conditional_factor(JPQL.java:1873)
	at org.apache.openjpa.kernel.jpql.JPQL.conditional_term(JPQL.java:1739)
	at org.apache.openjpa.kernel.jpql.JPQL.conditional_expression(JPQL.java:1701)
	at org.apache.openjpa.kernel.jpql.JPQL.where_clause(JPQL.java:1548)
	at org.apache.openjpa.kernel.jpql.JPQL.select_statement(JPQL.java:90)
	at org.apache.openjpa.kernel.jpql.JPQL.parseQuery(JPQL.java:62)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.parse(JPQLExpressionBuilder.java:1652)
	... 50 more



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message