openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fa...@apache.org
Subject svn commit: r654885 - /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java
Date Fri, 09 May 2008 17:05:46 GMT
Author: fancy
Date: Fri May  9 10:05:45 2008
New Revision: 654885

URL: http://svn.apache.org/viewvc?rev=654885&view=rev
Log:
OPENJPA-595 A common path() action in JPQL.jjt being used for Enum literal causes a simple
aliase resolution to fail

Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java?rev=654885&r1=654884&r2=654885&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java
Fri May  9 10:05:45 2008
@@ -1322,7 +1322,7 @@
                 Object value = field.get(null);
                 return factory.newLiteral(value, Literal.TYPE_UNKNOWN);
             } catch (NoSuchFieldException nsfe) {
-                if (node.parser.inEnumPath)
+                if (node.inEnumPath)
                     throw parseException(EX_USER, "no-field",
                         new Object[]{ c.getName(), fieldName }, nsfe);
                 else
@@ -1559,10 +1559,12 @@
         JPQLNode[] children;
         String text;
         boolean not = false;
+        boolean inEnumPath = false;
 
         public JPQLNode(JPQL parser, int id) {
             this.id = id;
             this.parser = parser;
+            this.inEnumPath = parser.inEnumPath;
         }
 
         public void jjtOpen() {



Mime
View raw message