openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Catalina Wei (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-1782) Better error messages when parsing JPQL literals
Date Fri, 03 Sep 2010 17:13:32 GMT
Better error messages when parsing JPQL literals
------------------------------------------------

                 Key: OPENJPA-1782
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1782
             Project: OpenJPA
          Issue Type: Improvement
          Components: query
    Affects Versions: 2.1.0
            Reporter: Catalina Wei
            Assignee: Catalina Wei


A problem was found while using some Glassfish Java EE 6 samples with the OpenJPA provider.
 
The sample was using double quotes for a literal on the "NOT LIKE" expression instead of the
required single quotes:

select count(l) from LogRecord l where l.record NOT LIKE "Canceling timer%"

We do not allow double quoted literals in JPQL queries. The above JPQL resulted an error with
text message:

Lexical error at line 1, column 58.  Encountered: "\"" (34), after : ""

Perhaps we can improve the message to something like:

Lexical error at line 1, column 58.  Encountered: "\"" (34), after : "LIKE". Expected single
quoted literal.

-- 
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