OPENJPA-595 A common path() action in JPQL.jjt being used for Enum literal causes a simple aliase resolution to fail

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@654885 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Catalina Wei 2008-05-09 17:05:45 +00:00
parent d35bc879cb
commit 01e08029e9
1 changed files with 3 additions and 1 deletions

View File

@ -1322,7 +1322,7 @@ public class JPQLExpressionBuilder
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 @@ public class JPQLExpressionBuilder
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() {