Hibernate SVN: r16352 - core/branches/antlr3.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2009-04-15 22:06:20 -0400 (Wed, 15 Apr 2009)
New Revision: 16352
Modified:
core/branches/antlr3/pom.xml
Log:
clean compile
Modified: core/branches/antlr3/pom.xml
===================================================================
--- core/branches/antlr3/pom.xml 2009-04-16 01:48:58 UTC (rev 16351)
+++ core/branches/antlr3/pom.xml 2009-04-16 02:06:20 UTC (rev 16352)
@@ -191,9 +191,9 @@
</configuration>
<executions>
<execution>
- <phase>generate-sources</phase>
<goals>
<goal>antlr</goal>
+ <goal>gunit</goal>
</goals>
</execution>
</executions>
15 years, 7 months
Hibernate SVN: r16351 - in core/branches/antlr3: src/main/java/org/hibernate/sql/ast/ordering and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2009-04-15 21:48:58 -0400 (Wed, 15 Apr 2009)
New Revision: 16351
Removed:
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/CollationSpecification.java
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/Factory.java
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragment.java
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderingSpecification.java
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/SortKey.java
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/SortSpecification.java
Modified:
core/branches/antlr3/
core/branches/antlr3/pom.xml
Log:
clean compile
Property changes on: core/branches/antlr3
___________________________________________________________________
Name: svn:ignore
- target
local
*.ipr
*.iws
*.iml
.classpath
.project
.nbattrs
*.log
*.properties
.clover
+ target
local
*.ipr
*.iws
*.iml
atlassian-ide-plugin.xml
.classpath
.project
.nbattrs
*.log
*.properties
.clover
Modified: core/branches/antlr3/pom.xml
===================================================================
--- core/branches/antlr3/pom.xml 2009-04-16 01:16:21 UTC (rev 16350)
+++ core/branches/antlr3/pom.xml 2009-04-16 01:48:58 UTC (rev 16351)
@@ -174,8 +174,12 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
+ <!--
<source>1.4</source>
<target>1.4</target>
+ -->
+ <source>1.5</source>
+ <target>1.5</target>
</configuration>
</plugin>
Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/CollationSpecification.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/CollationSpecification.java 2009-04-16 01:16:21 UTC (rev 16350)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/CollationSpecification.java 2009-04-16 01:48:58 UTC (rev 16351)
@@ -1,36 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- *
- */
-package org.hibernate.sql.ast.ordering;
-
-import org.hibernate.sql.ast.common.Node;
-
-/**
- * Models a collation specification (<tt>COLLATE</tt> using a specific character-set) within a
- * {@link SortSpecification}.
- *
- * @author Steve Ebersole
- */
-public class CollationSpecification extends Node {
-}
Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/Factory.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/Factory.java 2009-04-16 01:16:21 UTC (rev 16350)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/Factory.java 2009-04-16 01:48:58 UTC (rev 16351)
@@ -1,55 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- *
- */
-package org.hibernate.sql.ast.ordering;
-
-import org.hibernate.sql.ast.common.Node;
-import org.hibernate.sql.ast.common.NodeFactory;
-
-/**
- * Acts as a {@link NodeFactory} for injecting our specific AST node classes into the Antlr generated trees.
- *
- * @author Steve Ebersole
- */
-public class Factory extends NodeFactory implements OrderByTemplateTokenTypes {
- /**
- * {@inheritDoc}
- */
- public Class getASTNodeType(int i) {
- switch ( i ) {
- case ORDER_BY:
- return OrderByFragment.class;
- case SORT_SPEC:
- return SortSpecification.class;
- case ORDER_SPEC:
- return OrderingSpecification.class;
- case COLLATE:
- return CollationSpecification.class;
- case SORT_KEY:
- return SortKey.class;
- default:
- return Node.class;
- }
- }
-}
Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragment.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragment.java 2009-04-16 01:16:21 UTC (rev 16350)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragment.java 2009-04-16 01:48:58 UTC (rev 16351)
@@ -1,35 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- *
- */
-package org.hibernate.sql.ast.ordering;
-
-import org.hibernate.sql.ast.common.Node;
-
-/**
- * Represents a parsed <tt>order-by</tt> mapping fragment. This holds the tree of all {@link SortSpecification}s.
- *
- * @author Steve Ebersole
- */
-public class OrderByFragment extends Node {
-}
Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderingSpecification.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderingSpecification.java 2009-04-16 01:16:21 UTC (rev 16350)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderingSpecification.java 2009-04-16 01:48:58 UTC (rev 16351)
@@ -1,72 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- *
- */
-package org.hibernate.sql.ast.ordering;
-
-import org.hibernate.sql.ast.common.Node;
-
-/**
- * Models an ordering specification (<tt>ASCENDING</tt> or <tt>DESCENDING</tt>) within a {@link SortSpecification}.
- *
- * @author Steve Ebersole
- */
-public class OrderingSpecification extends Node {
- public static class Ordering {
- public static final Ordering ASCENDING = new Ordering( "asc" );
- public static final Ordering DESCENDING = new Ordering( "desc" );
-
- private final String name;
-
- private Ordering(String name) {
- this.name = name;
- }
- }
-
- private boolean resolved;
- private Ordering ordering;
-
- public Ordering getOrdering() {
- if ( !resolved ) {
- ordering = resolve( getText() );
- resolved = true;
- }
- return ordering;
- }
-
- private static Ordering resolve(String text) {
- if ( Ordering.ASCENDING.name.equals( text ) ) {
- return Ordering.ASCENDING;
- }
- else if ( Ordering.DESCENDING.name.equals( text ) ) {
- return Ordering.DESCENDING;
- }
- else {
- throw new IllegalStateException( "Unknown ordering [" + text + "]" );
- }
- }
-
- public String getRenderableText() {
- return getOrdering().name;
- }
-}
Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/SortKey.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/SortKey.java 2009-04-16 01:16:21 UTC (rev 16350)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/SortKey.java 2009-04-16 01:48:58 UTC (rev 16351)
@@ -1,36 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- *
- */
-package org.hibernate.sql.ast.ordering;
-
-import org.hibernate.sql.ast.common.Node;
-
-/**
- * Models the container node for the <tt>sort key</tt>, which is the term given by the ANSI SQL specification to the
- * expression upon which to sort for each {@link SortSpecification}
- *
- * @author Steve Ebersole
- */
-public class SortKey extends Node {
-}
Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/SortSpecification.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/SortSpecification.java 2009-04-16 01:16:21 UTC (rev 16350)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/SortSpecification.java 2009-04-16 01:48:58 UTC (rev 16351)
@@ -1,82 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- *
- */
-package org.hibernate.sql.ast.ordering;
-
-import antlr.collections.AST;
-
-import org.hibernate.sql.ast.common.Node;
-
-/**
- * Models each sorting exprersion.
- *
- * @author Steve Ebersole
- */
-public class SortSpecification extends Node {
- /**
- * Locate the specified {@link SortKey}.
- *
- * @return The sort key.
- */
- public SortKey getSortKey() {
- return ( SortKey ) getFirstChild();
- }
-
- /**
- * Locate the specified <tt>collation specification</tt>, if one.
- *
- * @return The <tt>collation specification</tt>, or null if none was specified.
- */
- public CollationSpecification getCollation() {
- AST possible = getSortKey().getNextSibling();
- return possible != null && OrderByTemplateTokenTypes.COLLATE == possible.getType()
- ? ( CollationSpecification ) possible
- : null;
- }
-
- /**
- * Locate the specified <tt>ordering specification</tt>, if one.
- *
- * @return The <tt>ordering specification</tt>, or null if none was specified.
- */
- public OrderingSpecification getOrdering() {
- // IMPL NOTE : the ordering-spec would be either the 2nd or 3rd child (of the overall sort-spec), if it existed,
- // depending on whether a collation-spec was specified.
-
- AST possible = getSortKey().getNextSibling();
- if ( possible == null ) {
- // There was no sort-spec parts specified other then the sort-key so there can be no ordering-spec...
- return null;
- }
-
- if ( OrderByTemplateTokenTypes.COLLATE == possible.getType() ) {
- // the 2nd child was a collation-spec, so we need to check the 3rd child instead.
- possible = possible.getNextSibling();
- }
-
- return possible != null && OrderByTemplateTokenTypes.ORDER_SPEC == possible.getType()
- ? ( OrderingSpecification ) possible
- : null;
- }
-}
15 years, 7 months
Hibernate SVN: r16350 - in core/branches/antlr3: src/main/antlr3/org/hibernate/sql/ast/ordering and 7 other directories.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2009-04-15 21:16:21 -0400 (Wed, 15 Apr 2009)
New Revision: 16350
Added:
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/util/ColumnMapper.java
Removed:
core/branches/antlr3/src/main/java/org/hibernate/hql/antlr/
core/branches/antlr3/src/main/java/org/hibernate/hql/ast/
core/branches/antlr3/src/main/java/org/hibernate/loader/hql/
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/AbstractToken.java
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/CommonHibernateLexer.java
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/Node.java
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/NodeFactory.java
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/NumericLiteralToken.java
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/TokenImpl.java
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragmentRenderer.java
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/phase/hql/
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/util/PathHelper.java
Modified:
core/branches/antlr3/pom.xml
core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/ordering/OrderByParser.g
core/branches/antlr3/src/main/java/org/hibernate/loader/criteria/CriteriaQueryTranslator.java
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/JoinType.java
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragmentParser.java
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragmentTranslator.java
Log:
clean up toward a buildable project (still have few issues)
Modified: core/branches/antlr3/pom.xml
===================================================================
--- core/branches/antlr3/pom.xml 2009-04-16 00:41:18 UTC (rev 16349)
+++ core/branches/antlr3/pom.xml 2009-04-16 01:16:21 UTC (rev 16350)
@@ -182,7 +182,7 @@
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr3-maven-plugin</artifactId>
- <version>3.1.3</version>
+ <version>3.1.3-steve</version>
<configuration>
</configuration>
<executions>
Modified: core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/ordering/OrderByParser.g
===================================================================
--- core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/ordering/OrderByParser.g 2009-04-16 00:41:18 UTC (rev 16349)
+++ core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/ordering/OrderByParser.g 2009-04-16 01:16:21 UTC (rev 16350)
@@ -64,122 +64,96 @@
}
@parser::members {
- private final TranslationContext context;
-
-// public OrderByParserParser(TokenStream input, TranslationContext context) {
-// super( input );
-// this.context = context;
-// }
-
/**
* Process the given node as a quote identifier. These need to be quoted in the dialect-specific way.
*
* @param ident The quoted-identifier node.
*
* @return The processed node.
- *
- * @see org.hibernate.dialect.Dialect#quote
*/
protected CommonTree quotedIdentifier(CommonTree ident) {
- String quotedText = Template.TEMPLATE + "." + context.getDialect().quote( '`' + ident.getText() + '`' );
- return createTreeNode( ident.getToken().getType(), quotedText );
+ // here we assume single-quote as the identifier quote character...
+ return createTreeNode( IDENTIFIER, Template.TEMPLATE + ".'" + ident.getText() + "'" );
}
+
/**
* Process the given node as a quote string.
*
- * @param ident The quoted string. This is used from within function param recognition, and represents a
+ * @param token The quoted string. This is used from within function param recognition, and represents a
* SQL-quoted string.
*
* @return The processed node.
*/
- protected CommonTree quotedString(CommonTree ident) {
- String quotedText = context.getDialect().quote( ident.getText() );
- return createTreeNode( ident.getToken().getType(), quotedText );
+ protected CommonTree quotedString(Token token) {
+ return createTreeNode( STRING_LITERAL, "'" + token.getText() + "'" );
}
/**
* A check to see if the text of the given node represents a known function name.
*
- * @param ast The node whose text we want to check.
+ * @param token The node whose text we want to check.
*
* @return True if the node's text is a known function name, false otherwise.
*
* @see org.hibernate.dialect.function.SQLFunctionRegistry
*/
- protected boolean isFunctionName(CommonToken token) {
- return context.getSqlFunctionRegistry().hasFunction( token.getText() );
+ protected boolean isFunctionName(Token token) {
+ return false;
}
/**
+ * Process the given node as a function name. Differs from {@link #resolveFunction(org.antlr.runtime.tree.CommonTree)
+ * specifically in that here we are expecting just a function name without parens or arguments.
+ *
+ * @param token The token representing the function name.
+ *
+ * @return The processed node.
+ */
+ protected CommonTree resolveFunction(Token token) {
+ return resolveFunction( new CommonTree( token ) );
+ }
+
+ /**
* Process the given node as a function.
*
- * @param The node representing the function invocation (including parameters as subtree components).
+ * @param tree The node representing the function invocation (including parameters as subtree components).
*
* @return The processed node.
*/
protected CommonTree resolveFunction(CommonTree tree) {
- // todo : handle sub functions?
- Tree parameters = tree.getChild(0);
- assert EXPR_LIST == parameters.getType();
+ Tree argumentList = tree.getChild( 0 );
+ assert argumentList == null || "{param list}".equals( argumentList.getText() );
- final String functionName = tree.getText();
- final SQLFunction function = context.getSqlFunctionRegistry().findSQLFunction( functionName );
- if ( function == null ) {
- String text = functionName;
- if ( parameters.getChildCount() > 0 ) {
- text+= '(';
- for ( int i = 0, x = parameters.getChildCount(); i < x; i++ ) {
- text+= parameters.getChild(i).getText();
- if ( i < x ) {
- text+= ", ";
- }
- }
- text+= ')';
- }
- return createTreeNode( IDENT, text );
- }
- else {
- ArrayList expressions = new ArrayList();
- for ( int i = 0, x = parameters.getChildCount(); i < x; i++ ) {
- expressions.add( parameters.getChild(i).getText() );
- }
- final String text = function.render( expressions, context.getSessionFactory() );
- return createTreeNode( IDENT, text );
- }
+ String text = tree.getText();
+ int count = argumentList == null ? 0 : argumentList.getChildCount();
+ if ( count > 0 ) {
+ text += '(';
+ for ( int i = 0; i < count; i++ ) {
+ Tree argument = argumentList.getChild( i );
+ text += argument.getText();
+ if ( i < count ) {
+ text += ", ";
+ }
+ }
+ text += ')';
+ }
+ return createTreeNode( IDENTIFIER, text );
}
+ protected CommonTree resolveIdent(Token token) {
+ return resolveIdent( new CommonTree( token ) );
+ }
+
/**
- * Process the given node as an IDENT. May represent either a column reference or a property reference.
+ * Process the given node as an IDENTIFIER. May represent either a column reference or a property reference.
*
* @param ident The node whose text represents either a column or property reference.
*
* @return The processed node.
*/
protected CommonTree resolveIdent(CommonTree ident) {
- String text = ident.getText();
- String[] replacements;
- try {
- replacements = context.getColumnMapper().map( text );
- }
- catch( Throwable t ) {
- replacements = null;
- }
-
- if ( replacements == null || replacements.length == 0 ) {
- return createTreeNode( IDENT, Template.TEMPLATE + "." + text );
- }
- else if ( replacements.length == 1 ) {
- return createTreeNode( IDENT, Template.TEMPLATE + "." + replacements[0] );
- }
- else {
- final CommonTree root = createTreeNode( IDENT_LIST, "{ident list}" );
- for ( int i = 0; i < replacements.length; i++ ) {
- final String identText = Template.TEMPLATE + '.' + replacements[i];
- root.addChild( createTreeNode( IDENT, identText ) );
- }
- return root;
- }
+ return createTreeNode( IDENTIFIER, Template.TEMPLATE + "." + ident.getText() );
}
private boolean validateIdentifierAsKeyword(String text) {
@@ -199,8 +173,8 @@
return token == null ? null : token.getText();
}
- private CommonTree createTreeNode(int type, String text) {
- return new CommonTree( CommonToken( type, text ) );
+ protected CommonTree createTreeNode(int type, String text) {
+ return new CommonTree( new CommonToken( type, text ) );
}
}
@@ -238,15 +212,15 @@
*/
expression
: hardQuoteExpression
- | ( IDENT ('.' IDENT)* OPEN_PAREN ) => functionCall
+ | ( IDENTIFIER ('.' IDENTIFIER)* OPEN_PAREN ) => functionCall
| simplePropertyPath
- | i=IDENT -> {isFunctionName($i)}? { resolveFunction( i ) }
- -> { resolveIdent( i ) }
+ | IDENTIFIER -> {isFunctionName($IDENTIFIER)}? { resolveFunction( $IDENTIFIER ) }
+ -> { resolveIdent( $IDENTIFIER ) }
;
hardQuoteExpression
@after { $tree = quotedIdentifier( $tree ); }
- : HARD_QUOTE IDENT HARD_QUOTE -> IDENT
+ : HARD_QUOTE IDENTIFIER HARD_QUOTE -> IDENTIFIER
;
/**
@@ -258,10 +232,10 @@
;
/**
- * A function-name is an IDENT followed by zero or more (DOT IDENT) sequences
+ * A function-name is an IDENTIFIER followed by zero or more (DOT IDENTIFIER) sequences
*/
functionName returns [String nameText]
- : i=IDENT { $nameText = $i.text; } ( '.' i=IDENT { $nameText += ( '.' + $i.text ); } )+
+ : i=IDENTIFIER { $nameText = $i.text; } ( '.' i=IDENTIFIER { $nameText += ( '.' + $i.text ); } )+
;
/**
@@ -278,7 +252,7 @@
functionParameter :
expression
| numericLiteral
- | qs=QUOTED_STRING -> { quotedString( $qs ) }
+ | qs=STRING_LITERAL -> { quotedString( $qs ) }
;
numericLiteral
@@ -298,7 +272,7 @@
;
collateKeyword
- : {(validateIdentifierAsKeyword("collate"))}?=> id=IDENT
+ : {(validateIdentifierAsKeyword("collate"))}?=> id=IDENTIFIER
-> COLLATE[$id]
;
@@ -307,7 +281,7 @@
* The collation name wrt {@link #collationSpecification}. Namely, the character-set.
*/
collationName
- : IDENT
+ : IDENTIFIER
;
/**
@@ -320,69 +294,72 @@
;
/**
- * A simple-property-path is an IDENT followed by one or more (DOT IDENT) sequences
+ * A simple-property-path is an IDENTIFIER followed by one or more (DOT IDENTIFIER) sequences
*/
simplePropertyPath
@after { $tree = resolveIdent($tree); }
- : p=simplePropertyPathText -> { createTreeNode(IDENT, $p.pathText) }
+ : p=simplePropertyPathText -> { createTreeNode(IDENTIFIER, $p.pathText) }
;
simplePropertyPathText returns [String pathText]
- : i=IDENT { $pathText = $i.text; } ( '.' i=IDENT { $pathText += ( '.' + $i.text ); } )+
+ : i=IDENTIFIER { $pathText = $i.text; } ( '.' i=IDENTIFIER { $pathText += ( '.' + $i.text ); } )+
;
// Lexer rules ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-WS : (NEWLINE | SPACE | '\u000C') { $channel=HIDDEN; } ;
+WS
+ : (SPACE | EOL | '\u000C') { $channel=HIDDEN; }
+ ;
fragment
-NEWLINE :
- ( '\r' (options{greedy=true;}: '\n')? | '\n' )
-;
+EOL
+ : ( '\r' (options{greedy=true;}: '\n')? | '\n' )
+ ;
fragment
-SPACE :
- ' ' | '\t'
-;
+SPACE
+ : ' '
+ | '\t'
+ ;
-OPEN_PAREN : '(';
-CLOSE_PAREN : ')';
+OPEN_PAREN
+ : '('
+ ;
+CLOSE_PAREN
+ : ')'
+ ;
-COMMA : ',';
+COMMA
+ : ','
+ ;
-HARD_QUOTE : '`';
+HARD_QUOTE
+ : '`'
+ ;
-IDENT : ID ;
+INTEGER_LITERAL
+ : (
+ '0'
+ | '1'..'9' ('0'..'9')*
+ )
+ ;
-fragment
-ID : ID_START_FRAGMENT ( ID_FRAGMENT )* ;
+DECIMAL_LITERAL : ('0' | '1'..'9' '0'..'9'*) INTEGER_TYPE_SUFFIX ;
-fragment
-ID_START_FRAGMENT
- : '_'
- | '$'
- | 'a'..'z'
- | '\u0080'..'\ufffe'
- ;
+HEX_LITERAL
+ : '0' ('x'|'X') HEX_DIGIT+ INTEGER_TYPE_SUFFIX?
+ ;
-fragment
-ID_FRAGMENT
- : ID_START_FRAGMENT
- | '0'..'9'
- ;
+OCTAL_LITERAL : '0' ('0'..'7')+ INTEGER_TYPE_SUFFIX? ;
-HEX_LITERAL : '0' ('x'|'X') ('0'..'9'|'a'..'f'|'A'..'F')+ INTEGRAL_TYPE_SUFFIX? ;
-OCTAL_LITERAL : '0' ('0'..'7')+ INTEGRAL_TYPE_SUFFIX? ;
+fragment
+HEX_DIGIT : ('0'..'9'|'a'..'f'|'A'..'F') ;
-DECIMAL_LITERAL : ('0' | '1'..'9' '0'..'9'*) INTEGRAL_TYPE_SUFFIX? ;
-
fragment
-INTEGRAL_TYPE_SUFFIX
- : ('l'|'L')
- ;
+INTEGER_TYPE_SUFFIX : ('l'|'L') ;
FLOATING_POINT_LITERAL
: ('0'..'9')+ '.' ('0'..'9')* EXPONENT? FLOAT_TYPE_SUFFIX?
@@ -397,14 +374,42 @@
fragment
FLOAT_TYPE_SUFFIX : ('f'|'F'|'d'|'D') ;
-QUOTED_STRING :
- ('\'' (options{greedy=true;}: ~('\'' | '\r' | '\n') | '\'' '\'' | NEWLINE)* '\'' )+
-;
-/**
- * Recognize either double-quote (") or back-tick (`) as delimiting a quoted identifier
- */
-QUOTED_IDENT :
- '"' (~('"' | '\r' | '\n') | '"' '"')+ '"'
- | '`' (~('`' | '\r' | '\n') | '`' '`')+ '`'
-;
+STRING_LITERAL
+ : '\'' ( ESCAPE_SEQUENCE | ~('\''|'\\') ) '\''
+ ;
+
+fragment
+ESCAPE_SEQUENCE
+ : '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\')
+ | UNICODE_ESCAPE
+ | OCTAL_ESCAPE
+ ;
+
+fragment
+OCTAL_ESCAPE
+ : '\\' ('0'..'3') ('0'..'7') ('0'..'7')
+ | '\\' ('0'..'7') ('0'..'7')
+ | '\\' ('0'..'7')
+ ;
+
+fragment
+UNICODE_ESCAPE
+ : '\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
+ ;
+
+IDENTIFIER
+ : IDENTIFIER_START_FRAGMENT (IDENTIFER_FRAGMENT)*
+ ;
+
+fragment
+IDENTIFIER_START_FRAGMENT
+ : ('a'..'z'|'A'..'Z'|'_'|'$'|'\u0080'..'\ufffe')
+ ;
+
+fragment
+IDENTIFER_FRAGMENT
+ : IDENTIFIER_START_FRAGMENT
+ | '0'..'9'
+ ;
+
Modified: core/branches/antlr3/src/main/java/org/hibernate/loader/criteria/CriteriaQueryTranslator.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/loader/criteria/CriteriaQueryTranslator.java 2009-04-16 00:41:18 UTC (rev 16349)
+++ core/branches/antlr3/src/main/java/org/hibernate/loader/criteria/CriteriaQueryTranslator.java 2009-04-16 01:16:21 UTC (rev 16350)
@@ -41,7 +41,6 @@
import org.hibernate.LockMode;
import org.hibernate.MappingException;
import org.hibernate.QueryException;
-import org.hibernate.hql.ast.util.SessionFactoryHelper;
import org.hibernate.criterion.CriteriaQuery;
import org.hibernate.criterion.Projection;
import org.hibernate.engine.QueryParameters;
@@ -509,7 +508,7 @@
// Detect discriminator values...
if ( value instanceof Class ) {
Class entityClass = ( Class ) value;
- Queryable q = SessionFactoryHelper.findQueryableUsingImports( sessionFactory, entityClass.getName() );
+ Queryable q = findQueryableUsingImports( entityClass.getName() );
if ( q != null ) {
Type type = q.getDiscriminatorType();
String stringValue = q.getDiscriminatorSQLValue();
@@ -536,6 +535,26 @@
);
}
+
+ /**
+ * Given a (potentially unqualified) class name, locate its persister.
+ *
+ * @param className The (potentially unqualified) class name.
+ * @return The defined persister for this class, or null if none found.
+ */
+ private Queryable findQueryableUsingImports(String className) {
+ final String importedClassName = sessionFactory.getImportedClassName( className );
+ if ( importedClassName == null ) {
+ return null;
+ }
+ try {
+ return ( Queryable ) sessionFactory.getEntityPersister( importedClassName );
+ }
+ catch ( MappingException me ) {
+ return null;
+ }
+ }
+
private PropertyMapping getPropertyMapping(String entityName)
throws MappingException {
return ( PropertyMapping ) sessionFactory.getEntityPersister( entityName );
Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/AbstractToken.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/AbstractToken.java 2009-04-16 00:41:18 UTC (rev 16349)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/AbstractToken.java 2009-04-16 01:16:21 UTC (rev 16350)
@@ -1,77 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- */
-package org.hibernate.sql.ast.common;
-
-/**
- * TODO : javadoc
- *
- * @author Steve Ebersole
- */
-public abstract class AbstractToken extends antlr.CommonToken {
- private int previousTokenType;
-
- /**
- * Getter for property 'previousTokenType'.
- *
- * @return Value for property 'previousTokenType'.
- */
- public int getPreviousTokenType() {
- return previousTokenType;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setType(int type) {
- this.previousTokenType = getType();
- super.setType( type );
- }
-
- /**
- * {@inheritDoc}
- */
- public String toDisplayString() {
- StringBuffer text = new StringBuffer( super.toString() );
- text.append( "['" )
- .append( getText() )
- .append( "', <" )
- .append( getType() )
- .append( "> previously: <" )
- .append( getPreviousTokenType() )
- .append( ">, line=" )
- .append( line )
- .append( ", col=" )
- .append( col );
- appendTextualInfo( text );
- text.append( "]" );
- return text.toString();
- }
-
- protected void appendTextualInfo(StringBuffer text) {
- }
-
- public String getLocation() {
- return getLine() + ":" + getColumn();
- }
-}
Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/CommonHibernateLexer.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/CommonHibernateLexer.java 2009-04-16 00:41:18 UTC (rev 16349)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/CommonHibernateLexer.java 2009-04-16 01:16:21 UTC (rev 16350)
@@ -1,70 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- */
-package org.hibernate.sql.ast.common;
-
-import java.io.InputStream;
-import java.io.Reader;
-
-/**
- * The common lexer for Hibernate stream parsers.
- *
- * @author Steve Ebersole
- */
-public class CommonHibernateLexer extends CommonHibernateLexerSupport {
- private boolean possibleIdentifier = false;
-
- public CommonHibernateLexer(InputStream in) {
- super( in );
- super.setTokenObjectClass( TokenImpl.class.getName() );
- }
-
- public CommonHibernateLexer(Reader in) {
- super( in );
- super.setTokenObjectClass( TokenImpl.class.getName() );
- }
-
- public void setTokenObjectClass(String s) {
- // no-op, we've already set ours in the constructor
- }
-
- protected void setPossibleIdentifier(boolean possibleIdentifier) {
- this.possibleIdentifier = possibleIdentifier;
- }
-
- protected antlr.Token makeToken(int i) {
- TokenImpl token = ( TokenImpl ) super.makeToken( i );
- token.setPossibleIdentifier( possibleIdentifier );
- possibleIdentifier = false;
- return token;
- }
-
- public void panic() {
- panic("CharScanner: panic");
- }
-
- public void panic(String s) {
- // todo : better exception type?
- throw new PanicException( s );
- }
-}
Modified: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/JoinType.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/JoinType.java 2009-04-16 00:41:18 UTC (rev 16349)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/JoinType.java 2009-04-16 01:16:21 UTC (rev 16350)
@@ -3,8 +3,6 @@
import java.io.Serializable;
import java.util.HashMap;
-import org.hibernate.sql.ast.util.ASTUtil;
-
/**
* Represents a canonical join type.
* <p/>
@@ -62,25 +60,25 @@
return INSTANCES.get( name );
}
- public static JoinType resolve(Node node) {
- switch ( node.getType() ) {
- case Sql92TokenTypes.INNER :
- return JoinType.INNER;
- case Sql92TokenTypes.LEFT :
- return JoinType.LEFT;
- case Sql92TokenTypes.RIGHT :
- return JoinType.RIGHT;
- case Sql92TokenTypes.CROSS :
- return JoinType.CROSS;
- case Sql92TokenTypes.FULL :
- return JoinType.FULL;
- default :
- throw new IllegalArgumentException(
- "Cannot resolve join-type node [type=" +
- ASTUtil.getTokenTypeName( Sql92TokenTypes.class, node.getType() ) +
- ", text=" + node.getText() +
- "]"
- );
- }
- }
+// public static JoinType resolve(Node node) {
+// switch ( node.getType() ) {
+// case Sql92TokenTypes.INNER :
+// return JoinType.INNER;
+// case Sql92TokenTypes.LEFT :
+// return JoinType.LEFT;
+// case Sql92TokenTypes.RIGHT :
+// return JoinType.RIGHT;
+// case Sql92TokenTypes.CROSS :
+// return JoinType.CROSS;
+// case Sql92TokenTypes.FULL :
+// return JoinType.FULL;
+// default :
+// throw new IllegalArgumentException(
+// "Cannot resolve join-type node [type=" +
+// ASTUtil.getTokenTypeName( Sql92TokenTypes.class, node.getType() ) +
+// ", text=" + node.getText() +
+// "]"
+// );
+// }
+// }
}
Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/Node.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/Node.java 2009-04-16 00:41:18 UTC (rev 16349)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/Node.java 2009-04-16 01:16:21 UTC (rev 16350)
@@ -1,104 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- */
-package org.hibernate.sql.ast.common;
-
-import antlr.Token;
-import antlr.collections.AST;
-
-/**
- * Basic AST node
- *
- * @author Joshua Davis
- * @author Steve Ebersole
- */
-public class Node extends antlr.CommonAST {
- private String filename;
- private int line;
- private int column;
-
- public Node() {
- super();
- }
-
- public Node(Token tok) {
- super( tok ); // NOTE: This will call initialize(tok)!
- }
-
- /**
- * Retrieve the textual representation of a node to be used in the resulting sql.
- * <p/>
- * This is intended for subclasses to override to allow certain nodes to provide their own renderable representation
- * instead of the default {@link antlr.collections.AST#getText()}.
- *
- * @return The renderable text.
- */
- public String getRenderableText() {
- return getText();
- }
-
- public void initialize(Token token) {
- super.initialize( token );
- // Propagate line/column information from the lexer during
- // stream parsing.
- filename = token.getFilename();
- line = token.getLine();
- column = token.getColumn();
- }
-
- public void initialize(AST ast) {
- super.initialize( ast );
- if ( ast instanceof Node ) {
- // Propagate line/column information from the source AST during tree walking.
- transferTrackingInfo( ( Node ) ast );
- }
- }
-
- public void transferTrackingInfo(AST ast) {
- if ( ast instanceof Node ) {
- transferTrackingInfo( ( Node ) ast );
- }
- else {
- line = ast.getLine();
- column = ast.getColumn();
- }
- }
-
- public void transferTrackingInfo(Node node) {
- filename = node.filename;
- line = node.line;
- column = node.column;
- }
-
- public String getFilename() {
- return filename;
- }
-
- public int getLine() {
- return line;
- }
-
- public int getColumn() {
- return column;
- }
-}
Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/NodeFactory.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/NodeFactory.java 2009-04-16 00:41:18 UTC (rev 16349)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/NodeFactory.java 2009-04-16 01:16:21 UTC (rev 16350)
@@ -1,52 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- */
-package org.hibernate.sql.ast.common;
-
-import antlr.ASTFactory;
-
-/**
- * An {@link ASTFactory} which includes line/column tracking information into its generated
- * {@link antlr.collections.AST nodes}.
- *
- * @author Joshua Davis
- * @author Steve Ebersole
- */
-public class NodeFactory extends ASTFactory {
- /**
- * Determine the default {@link antlr.collections.AST node} class to use. Used from within
- * {@link #getASTNodeType(int)} when no specific override is defined/needed for a particular token type.
- *
- * @return The default {@link antlr.collections.AST node} class to use
- */
- protected Class determineDefaultNodeClass() {
- return Node.class;
- }
-
- /**
- * {@inheritDoc}
- */
- public Class getASTNodeType(int tokenType) {
- return determineDefaultNodeClass();
- }
-}
Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/NumericLiteralToken.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/NumericLiteralToken.java 2009-04-16 00:41:18 UTC (rev 16349)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/NumericLiteralToken.java 2009-04-16 01:16:21 UTC (rev 16350)
@@ -1,50 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- */
-package org.hibernate.sql.ast.common;
-
-/**
- * A custom token class for representing numeric literals. The reasoning is that there are 2 classifications
- * by which we need to identify numeric literals:<ol>
- * <li>The SQL notions of <tt>exact</tt> and <tt>approximate</tt></li>
- * <li>The java language types (i.e. <tt>int</tt>, <tt>long</tt>, etc)</li>
- * </ol>
- * <p/>
- * Explicitly handling the intersection of these two classification sets is unwieldy (EXACT_INTEGER_LITERAL, etc) so
- * we instead track one classification by the token-types, and the other is tracked by state on the token. Since we
- * generally need to treat with the java types, we use this custom token to track whether the literal is <tt>exact</tt>
- * or <tt>approximate</tt>.
- *
- * @author Steve Ebersole
- */
-public class NumericLiteralToken extends AbstractToken {
- private boolean isApproximate = false; // assume exact
-
- public boolean isApproximate() {
- return isApproximate;
- }
-
- public void setApproximate(boolean approximate) {
- isApproximate = approximate;
- }
-}
Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/TokenImpl.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/TokenImpl.java 2009-04-16 00:41:18 UTC (rev 16349)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/common/TokenImpl.java 2009-04-16 01:16:21 UTC (rev 16350)
@@ -1,58 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- */
-package org.hibernate.sql.ast.common;
-
-/**
- * A custom token class for various Hibernate lexers; specifically we are adding the
- * {@link #isPossibleIdentifier() keyword-as-identifier} capability and tracking of any changes in token types
- * via {@link #getPreviousTokenType()}.
- *
- * @author Steve Ebersole
- */
-public class TokenImpl extends AbstractToken {
- private boolean possibleIdentifier;
-
- /**
- * Getter for property 'possibleIdentifier'.
- *
- * @return Value for property 'possibleIdentifier'.
- */
- public boolean isPossibleIdentifier() {
- return possibleIdentifier;
- }
-
- /**
- * Setter for property 'possibleIdentifier'.
- *
- * @param possibleIdentifier Value to set for property 'possibleIdentifier'.
- */
- public void setPossibleIdentifier(boolean possibleIdentifier) {
- this.possibleIdentifier = possibleIdentifier;
- }
-
- protected void appendTextualInfo(StringBuffer text) {
- text.append( ",possibleIdentifier?=" ).append( possibleIdentifier );
- }
-
-}
Modified: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragmentParser.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragmentParser.java 2009-04-16 00:41:18 UTC (rev 16349)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragmentParser.java 2009-04-16 01:16:21 UTC (rev 16350)
@@ -26,24 +26,23 @@
import java.util.ArrayList;
-import antlr.TokenStream;
-import antlr.CommonAST;
-import antlr.TokenStreamException;
-import antlr.collections.AST;
-
import org.hibernate.sql.Template;
import org.hibernate.dialect.function.SQLFunction;
import org.hibernate.util.StringHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.antlr.runtime.TokenStream;
+import org.antlr.runtime.CommonToken;
+import org.antlr.runtime.tree.CommonTree;
+import org.antlr.runtime.tree.Tree;
/**
* Extension of the Antlr-generated parser for the purpose of adding our custom parsing behavior.
*
* @author Steve Ebersole
*/
-public class OrderByFragmentParser extends GeneratedOrderByFragmentParser {
+public class OrderByFragmentParser extends OrderByParserParser {
private static final Logger log = LoggerFactory.getLogger( OrderByFragmentParser.class );
private final TranslationContext context;
@@ -51,98 +50,80 @@
public OrderByFragmentParser(TokenStream lexer, TranslationContext context) {
super( lexer );
- super.setASTFactory( new Factory() );
this.context = context;
}
+//
+//
+// // handle trace logging ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// public void traceIn(String ruleName) throws TokenStreamException {
+// if ( inputState.guessing > 0 ) {
+// return;
+// }
+// String prefix = StringHelper.repeat( "-", (traceDepth++ * 2) ) + "->";
+// trace( prefix + ruleName );
+// }
+//
+// public void traceOut(String ruleName) throws TokenStreamException {
+// if ( inputState.guessing > 0 ) {
+// return;
+// }
+// String prefix = "<-" + StringHelper.repeat( "-", (--traceDepth * 2) );
+// trace( prefix + ruleName );
+// }
+//
+// private void trace(String msg) {
+// log.trace( msg );
+// }
+protected CommonTree quotedIdentifier(CommonTree ident) {
+ return createTreeNode( IDENTIFIER, Template.TEMPLATE + "." + context.getDialect().quote( '`' + ident.getText() + '`' ) );
+}
- // handle trace logging ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- public void traceIn(String ruleName) throws TokenStreamException {
- if ( inputState.guessing > 0 ) {
- return;
- }
- String prefix = StringHelper.repeat( "-", (traceDepth++ * 2) ) + "->";
- trace( prefix + ruleName );
+ protected CommonTree quotedString(CommonTree ident) {
+ return createTreeNode( IDENTIFIER, context.getDialect().quote( ident.getText() ) );
}
- public void traceOut(String ruleName) throws TokenStreamException {
- if ( inputState.guessing > 0 ) {
- return;
- }
- String prefix = "<-" + StringHelper.repeat( "-", (--traceDepth * 2) );
- trace( prefix + ruleName );
- }
+ protected boolean isFunctionName(CommonToken token) {
+ return context.getSqlFunctionRegistry().hasFunction( token.getText() );
+ }
- private void trace(String msg) {
- log.trace( msg );
- }
+ protected CommonTree resolveFunction(CommonTree tree) {
+ Tree argumentList = tree.getChild( 0 );
+ assert "{param list}".equals( argumentList.getText() );
-
- /**
- * {@inheritDoc}
- */
- protected AST quotedIdentifier(AST ident) {
- return getASTFactory().create(
- IDENT,
- Template.TEMPLATE + "." + context.getDialect().quote( '`' + ident.getText() + '`' )
- );
- }
-
- /**
- * {@inheritDoc}
- */
- protected AST quotedString(AST ident) {
- return getASTFactory().create( IDENT, context.getDialect().quote( ident.getText() ) );
- }
-
- /**
- * {@inheritDoc}
- */
- protected boolean isFunctionName(AST ast) {
- return context.getSqlFunctionRegistry().hasFunction( ast.getText() );
- }
-
- /**
- * {@inheritDoc}
- */
- protected AST resolveFunction(AST ast) {
- AST child = ast.getFirstChild();
- assert "{param list}".equals( child.getText() );
- child = child.getFirstChild();
-
- final String functionName = ast.getText();
+ final String functionName = tree.getText();
final SQLFunction function = context.getSqlFunctionRegistry().findSQLFunction( functionName );
+
if ( function == null ) {
+ // If the function is not registered with the session factory we just need to render it as-is
+ // including its arguments...
String text = functionName;
- if ( child != null ) {
- text += '(';
- while ( child != null ) {
- text += child.getText();
- child = child.getNextSibling();
- if ( child != null ) {
- text += ", ";
- }
- }
- text += ')';
- }
- return getASTFactory().create( IDENT, text );
+ int count = argumentList.getChildCount();
+ if ( count > 0 ) {
+ text += '(';
+ for ( int i = 0; i < count; i++ ) {
+ Tree argument = argumentList.getChild( i );
+ text += argument.getText();
+ if ( i < count ) {
+ text += ", ";
+ }
+ }
+ text += ')';
+ }
+ return createTreeNode( IDENTIFIER, text );
}
else {
ArrayList expressions = new ArrayList();
- while ( child != null ) {
- expressions.add( child.getText() );
- child = child.getNextSibling();
- }
+ for ( int i = 0; i < argumentList.getChildCount(); i++ ) {
+ expressions.add( argumentList.getChild( i ).getText() );
+ }
final String text = function.render( expressions, context.getSessionFactory() );
- return getASTFactory().create( IDENT, text );
+ return createTreeNode( IDENTIFIER, text );
}
}
- /**
- * {@inheritDoc}
- */
- protected AST resolveIdent(AST ident) {
+ protected CommonTree resolveIdent(CommonTree ident) {
String text = ident.getText();
String[] replacements;
try {
@@ -153,62 +134,62 @@
}
if ( replacements == null || replacements.length == 0 ) {
- return getASTFactory().create( IDENT, Template.TEMPLATE + "." + text );
+ return createTreeNode( IDENTIFIER, Template.TEMPLATE + "." + text );
}
else if ( replacements.length == 1 ) {
- return getASTFactory().create( IDENT, Template.TEMPLATE + "." + replacements[0] );
+ return createTreeNode( IDENTIFIER, Template.TEMPLATE + "." + replacements[0] );
}
else {
- final AST root = getASTFactory().create( IDENT_LIST, "{ident list}" );
+ final CommonTree root = createTreeNode( IDENT_LIST, "{ident list}" );
for ( int i = 0; i < replacements.length; i++ ) {
final String identText = Template.TEMPLATE + '.' + replacements[i];
- root.addChild( getASTFactory().create( IDENT, identText ) );
+ root.addChild( createTreeNode( IDENTIFIER, identText ) );
}
return root;
}
}
-
- /**
- * {@inheritDoc}
- */
- protected AST postProcessSortSpecification(AST sortSpec) {
- assert SORT_SPEC == sortSpec.getType();
- SortSpecification sortSpecification = ( SortSpecification ) sortSpec;
- AST sortKey = sortSpecification.getSortKey();
- if ( IDENT_LIST == sortKey.getFirstChild().getType() ) {
- AST identList = sortKey.getFirstChild();
- AST ident = identList.getFirstChild();
- AST holder = new CommonAST();
- do {
- holder.addChild(
- createSortSpecification(
- ident,
- sortSpecification.getCollation(),
- sortSpecification.getOrdering()
- )
- );
- ident = ident.getNextSibling();
- } while ( ident != null );
- sortSpec = holder.getFirstChild();
- }
- return sortSpec;
- }
-
- private SortSpecification createSortSpecification(
- AST ident,
- CollationSpecification collationSpecification,
- OrderingSpecification orderingSpecification) {
- AST sortSpecification = getASTFactory().create( SORT_SPEC, "{{sort specification}}" );
- AST sortKey = getASTFactory().create( SORT_KEY, "{{sort key}}" );
- AST newIdent = getASTFactory().create( ident.getType(), ident.getText() );
- sortKey.setFirstChild( newIdent );
- sortSpecification.setFirstChild( sortKey );
- if ( collationSpecification != null ) {
- sortSpecification.addChild( collationSpecification );
- }
- if ( orderingSpecification != null ) {
- sortSpecification.addChild( orderingSpecification );
- }
- return ( SortSpecification ) sortSpecification;
- }
+//
+// /**
+// * {@inheritDoc}
+// */
+// protected AST postProcessSortSpecification(AST sortSpec) {
+// assert SORT_SPEC == sortSpec.getType();
+// SortSpecification sortSpecification = ( SortSpecification ) sortSpec;
+// AST sortKey = sortSpecification.getSortKey();
+// if ( IDENT_LIST == sortKey.getFirstChild().getType() ) {
+// AST identList = sortKey.getFirstChild();
+// AST ident = identList.getFirstChild();
+// AST holder = new CommonAST();
+// do {
+// holder.addChild(
+// createSortSpecification(
+// ident,
+// sortSpecification.getCollation(),
+// sortSpecification.getOrdering()
+// )
+// );
+// ident = ident.getNextSibling();
+// } while ( ident != null );
+// sortSpec = holder.getFirstChild();
+// }
+// return sortSpec;
+// }
+//
+// private SortSpecification createSortSpecification(
+// AST ident,
+// CollationSpecification collationSpecification,
+// OrderingSpecification orderingSpecification) {
+// AST sortSpecification = getASTFactory().create( SORT_SPEC, "{{sort specification}}" );
+// AST sortKey = getASTFactory().create( SORT_KEY, "{{sort key}}" );
+// AST newIdent = getASTFactory().create( ident.getType(), ident.getText() );
+// sortKey.setFirstChild( newIdent );
+// sortSpecification.setFirstChild( sortKey );
+// if ( collationSpecification != null ) {
+// sortSpecification.addChild( collationSpecification );
+// }
+// if ( orderingSpecification != null ) {
+// sortSpecification.addChild( orderingSpecification );
+// }
+// return ( SortSpecification ) sortSpecification;
+// }
}
Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragmentRenderer.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragmentRenderer.java 2009-04-16 00:41:18 UTC (rev 16349)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragmentRenderer.java 2009-04-16 01:16:21 UTC (rev 16350)
@@ -1,88 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- *
- */
-package org.hibernate.sql.ast.ordering;
-
-import antlr.collections.AST;
-
-import org.hibernate.sql.ast.common.Node;
-import org.hibernate.sql.ast.util.ASTPrinter;
-import org.hibernate.util.StringHelper;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * TODO : javadoc
- *
- * @author Steve Ebersole
- */
-public class OrderByFragmentRenderer extends GeneratedOrderByFragmentRenderer {
- private static final Logger log = LoggerFactory.getLogger( OrderByFragmentRenderer.class );
-
- /**
- * {@inheritDoc}
- */
- protected void out(AST ast) {
- out( ( ( Node ) ast ).getRenderableText() );
- }
-
- // handle trace logging ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- private final ASTPrinter printer = new ASTPrinter( OrderByTemplateTokenTypes.class );
- private int traceDepth = 0;
-
- /**
- * {@inheritDoc}
- */
- public final void traceIn(String ruleName, AST tree) {
- if ( inputState.guessing > 0 ) {
- return;
- }
- String prefix = StringHelper.repeat( '-', (traceDepth++ * 2) ) + "-> ";
- String traceText = ruleName + " (" + buildTraceNodeName(tree) + ")";
- traceExecution( prefix + traceText );
- }
-
- protected String buildTraceNodeName(AST tree) {
- return tree == null
- ? "???"
- : tree.getText() + " [" + printer.getTokenTypeName( tree.getType() ) + "]";
- }
-
- /**
- * {@inheritDoc}
- */
- public final void traceOut(String ruleName, AST tree) {
- if ( inputState.guessing > 0 ) {
- return;
- }
- String prefix = "<-" + StringHelper.repeat( '-', (--traceDepth * 2) ) + " ";
- traceExecution( prefix + ruleName );
- }
-
- protected void traceExecution(String msg) {
- log.trace( msg );
- }
-}
Modified: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragmentTranslator.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragmentTranslator.java 2009-04-16 00:41:18 UTC (rev 16349)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/ordering/OrderByFragmentTranslator.java 2009-04-16 01:16:21 UTC (rev 16350)
@@ -30,7 +30,11 @@
import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
-import org.hibernate.hql.ast.util.ASTPrinter;
+import org.hibernate.sql.ast.util.ASTPrinter;
+import org.antlr.runtime.CharStream;
+import org.antlr.runtime.TokenStream;
+import org.antlr.runtime.ANTLRStringStream;
+import org.antlr.runtime.CommonTokenStream;
/**
* A translator which coordinates translation of an <tt>order-by</tt> mapping.
@@ -54,8 +58,8 @@
* @return The translated fragment.
*/
public String render(String fragment) {
- GeneratedOrderByLexer lexer = new GeneratedOrderByLexer( new StringReader( fragment ) );
- OrderByFragmentParser parser = new OrderByFragmentParser( lexer, context );
+ OrderByParserLexer lexer = new OrderByParserLexer( new ANTLRStringStream( fragment ) );
+ OrderByFragmentParser parser = new OrderByFragmentParser( new CommonTokenStream( lexer ), context );
try {
parser.orderByFragment();
}
@@ -66,22 +70,23 @@
throw new HibernateException( "Unable to parse order-by fragment", t );
}
- if ( log.isTraceEnabled() ) {
- ASTPrinter printer = new ASTPrinter( OrderByTemplateTokenTypes.class );
- log.trace( printer.showAsString( parser.getAST(), "--- {order-by fragment} ---" ) );
- }
-
- OrderByFragmentRenderer renderer = new OrderByFragmentRenderer();
- try {
- renderer.orderByFragment( parser.getAST() );
- }
- catch ( HibernateException e ) {
- throw e;
- }
- catch ( Throwable t ) {
- throw new HibernateException( "Unable to render parsed order-by fragment", t );
- }
-
- return renderer.getRenderedFragment();
+// if ( log.isTraceEnabled() ) {
+// ASTPrinter printer = new ASTPrinter( OrderByParserParser.class );
+// log.trace( printer.showAsString( parser..getAST(), "--- {order-by fragment} ---" ) );
+// }
+//
+// OrderByFragmentRenderer renderer = new OrderByFragmentRenderer();
+// try {
+// renderer.orderByFragment( parser.getAST() );
+// }
+// catch ( HibernateException e ) {
+// throw e;
+// }
+// catch ( Throwable t ) {
+// throw new HibernateException( "Unable to render parsed order-by fragment", t );
+// }
+//
+// return renderer.getRenderedFragment();
+ return null;
}
}
Added: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/util/ColumnMapper.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/util/ColumnMapper.java (rev 0)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/util/ColumnMapper.java 2009-04-16 01:16:21 UTC (rev 16350)
@@ -0,0 +1,48 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+package org.hibernate.sql.ast.util;
+
+import org.hibernate.HibernateException;
+
+/**
+ * Contract for mapping a (an assumed) property reference to its columns.
+ * <p/>
+ * todo : this should probably get moved into the general sql-rendering package.
+ *
+ * @author Steve Ebersole
+ */
+public interface ColumnMapper {
+ /**
+ * Resolve the property reference to its underlying columns.
+ *
+ * @param reference The property reference name.
+ *
+ * @return The underlying columns, or null if the property reference is unknown.
+ *
+ * @throws HibernateException Generally indicates that the property reference is unkown; interpretation is the
+ * same as a null return.
+ */
+ public String[] map(String reference) throws HibernateException;
+}
Deleted: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/util/PathHelper.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/util/PathHelper.java 2009-04-16 00:41:18 UTC (rev 16349)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/util/PathHelper.java 2009-04-16 01:16:21 UTC (rev 16350)
@@ -1,111 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- */
-package org.hibernate.sql.ast.util;
-
-import org.hibernate.util.StringHelper;
-import org.hibernate.sql.ast.common.Sql92TokenTypes;
-
-import antlr.ASTFactory;
-import antlr.collections.AST;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Provides utility methods for dealing with path expressions.
- * <p/>
- * Note that these utilities do not properly account for index operations.
- *
- * @author Joshua Davis
- * @author Steve Ebersole
- */
-public final class PathHelper implements Sql92TokenTypes {
- private static final Logger log = LoggerFactory.getLogger( PathHelper.class );
-
- /**
- * Direct instantiation of PathHelper disallowed.
- */
- private PathHelper() {
- }
-
- /**
- * Turns a path into an AST.
- *
- * @param path The path.
- * @param factory The AST factory to use.
- * @return An HQL AST representing the path.
- */
- public static AST parsePath(String path, ASTFactory factory) {
- String[] identifiers = StringHelper.split( ".", path );
- AST lhs = null;
- for ( int i = 0; i < identifiers.length; i++ ) {
- String identifier = identifiers[i];
- AST child = ASTUtil.create( factory, IDENT, identifier );
- if ( i == 0 ) {
- lhs = child;
- }
- else {
- lhs = ASTUtil.createBinarySubtree( factory, DOT, ".", lhs, child );
- }
- }
- if ( log.isDebugEnabled() ) {
- log.debug( "parsePath() : " + path + " -> " + ASTUtil.getDebugString( lhs ) );
- }
- return lhs;
- }
-
- /**
- * Provides the inverse functionality of {@link #parsePath}. In other words, for any path
- * 'p' not involving index operations, p == reconstitutePathString( parsePath( p, someASTFactory ) ).
- *
- * @param pathAST The path AST structure.
- * @return The corresponding path string.
- */
- public static String rebuildPathExpression(AST pathAST) {
- final StringBuffer buffer = new StringBuffer();
- visitExpression( pathAST, buffer );
- return buffer.toString();
- }
-
- private static void visitExpression(AST expression, StringBuffer buffer) {
- if ( DOT == expression.getType() ) {
- visitDot( expression.getFirstChild(), expression.getFirstChild().getNextSibling(), buffer );
- }
- else if ( IDENT == expression.getType() ) {
- visitIdent( expression, buffer );
- }
- }
-
- private static void visitDot(AST lhs, AST rhs, StringBuffer buffer) {
- visitExpression( lhs, buffer );
- buffer.append( '.' ).append( rhs.getText() );
- }
-
- private static void visitIdent(AST ident, StringBuffer buffer) {
- buffer.append( ident.getText() );
- }
-
- public static String getAlias(String path) {
- return StringHelper.root( path );
- }
-}
15 years, 7 months
Hibernate SVN: r16349 - core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse.
by hibernate-commits@lists.jboss.org
Author: porcelli
Date: 2009-04-15 20:41:18 -0400 (Wed, 15 Apr 2009)
New Revision: 16349
Modified:
core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQL.g
core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQLTreeWalker.g
Log:
TreeWalker and Parser working together
Modified: core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQL.g
===================================================================
--- core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQL.g 2009-04-16 00:18:25 UTC (rev 16348)
+++ core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQL.g 2009-04-16 00:41:18 UTC (rev 16349)
@@ -650,8 +650,8 @@
-> {isNegated}? ^(NOT_LIKE[$not_key.start, "not like"] $relationalExpression concatenation likeEscape?)
-> ^(like_key $relationalExpression concatenation likeEscape?)
| member_of_key propertyReference
- -> {isNegated}? ^(NOT_IN[$not_key.start, "not in"] ^(IN_LIST ^(QUERY ^(SELECT_FROM ^(FROM propertyReference)))))
- -> ^(IN[$member_of_key.start, "in"] ^(IN_LIST ^(QUERY ^(SELECT_FROM ^(FROM propertyReference)))))
+ -> {isNegated}? ^(NOT_IN[$not_key.start, "not in"] $relationalExpression ^(IN_LIST ^(QUERY ^(QUERY_SPEC ^(SELECT_FROM ^(FROM propertyReference))))))
+ -> ^(IN[$member_of_key.start, "in"] $relationalExpression ^(IN_LIST ^(QUERY ^(QUERY_SPEC ^(SELECT_FROM ^(FROM propertyReference))))))
)
)?
;
Modified: core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQLTreeWalker.g
===================================================================
--- core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQLTreeWalker.g 2009-04-16 00:18:25 UTC (rev 16348)
+++ core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQLTreeWalker.g 2009-04-16 00:41:18 UTC (rev 16349)
@@ -117,7 +117,9 @@
;
persisterSpaces
- : ^(PERSISTER_SPACE persisterSpace)
+ : propertyReference
+ | ^(GENERIC_ELEMENT identPrimary)
+ | ^(PERSISTER_SPACE persisterSpace)
;
persisterSpace
15 years, 7 months
Hibernate SVN: r16348 - in core/branches/antlr3/src: test/gunit/org/hibernate/sql/ast/phase/hql/parse and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: porcelli
Date: 2009-04-15 20:18:25 -0400 (Wed, 15 Apr 2009)
New Revision: 16348
Added:
core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQLTreeWalker.g
core/branches/antlr3/src/test/gunit/org/hibernate/sql/ast/phase/hql/parse/TempgUnitHQLGrammar.testsuite
core/branches/antlr3/src/test/gunit/org/hibernate/sql/ast/phase/hql/parse/gUnitHQLTreeWalker.testsuite
Modified:
core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQL.g
core/branches/antlr3/src/test/gunit/org/hibernate/sql/ast/phase/hql/parse/gUnitGenaratedAST.testsuite
Log:
Additional gUnitTests, TreeWalker and updates on parser
Modified: core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQL.g
===================================================================
--- core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQL.g 2009-04-15 19:18:26 UTC (rev 16347)
+++ core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQL.g 2009-04-16 00:18:25 UTC (rev 16348)
@@ -9,9 +9,6 @@
FILTER;
ALIAS_NAME;
-
- EXPR;
- LOGICAL_EXPR;
IS_NOT_NULL;
IS_NULL;
@@ -369,17 +366,13 @@
;
assignment
- : assignmentField EQUALS^ newValue
+ : assignmentField EQUALS^ concatenation
;
assignmentField
: dotIdentifierPath -> ^(ASSIGNMENT_FIELD dotIdentifierPath)
;
-newValue
- : concatenation -> ^(EXPR concatenation)
- ;
-
deleteStatement
: delete_key^ from_key!? entityName aliasClause whereClause?
;
@@ -429,7 +422,7 @@
groupingValue
: concatenation collationSpecification?
- -> ^(GROUPING_VALUE ^(EXPR concatenation) collationSpecification?)
+ -> ^(GROUPING_VALUE concatenation collationSpecification?)
;
whereClause
@@ -541,7 +534,6 @@
selectExpression
: expression aliasClause
- -> ^(EXPR expression) aliasClause?
;
aliasClause
@@ -590,7 +582,6 @@
sortKey
: concatenation
- -> ^(EXPR concatenation)
;
collationSpecification
@@ -609,7 +600,6 @@
logicalExpression
: expression
- -> ^(LOGICAL_EXPR expression)
;
expression
@@ -667,20 +657,19 @@
;
likeEscape
- : escape_key concatenation
- -> ^(escape_key ^(EXPR concatenation))
+ : escape_key^ concatenation
;
inList
: collectionExpression
-> ^(IN_LIST collectionExpression)
| LEFT_PAREN ( expression (COMMA expression)* | subQuery ) RIGHT_PAREN
- -> ^(IN_LIST ^(EXPR expression)* subQuery?)
+ -> ^(IN_LIST expression* subQuery?)
;
betweenList
: concatenation and_key concatenation
- -> ^(BETWEEN_LIST ^(EXPR concatenation)+)
+ -> ^(BETWEEN_LIST concatenation+)
;
concatenation
@@ -713,10 +702,8 @@
;
caseAbbreviation
- : nullif_key LEFT_PAREN concatenation COMMA concatenation RIGHT_PAREN
- -> ^(nullif_key ^(EXPR concatenation)+)
- | coalesce_key LEFT_PAREN concatenation (COMMA concatenation)* RIGHT_PAREN
- -> ^(coalesce_key ^(EXPR concatenation)+)
+ : nullif_key^ LEFT_PAREN! concatenation COMMA! concatenation RIGHT_PAREN!
+ | coalesce_key^ LEFT_PAREN! concatenation (COMMA! concatenation)* RIGHT_PAREN!
;
caseSpecification
@@ -728,17 +715,15 @@
simpleCase
: case_key concatenation simpleCaseWhenClause+ elseClause? end_key
- -> ^(SIMPLE_CASE[$case_key.start, $case_key.text] ^(EXPR concatenation) simpleCaseWhenClause+ elseClause?)
+ -> ^(SIMPLE_CASE[$case_key.start, $case_key.text] concatenation simpleCaseWhenClause+ elseClause?)
;
simpleCaseWhenClause
- : when_key concatenation then_key concatenation
- -> ^(when_key ^(EXPR concatenation)+)
+ : when_key^ concatenation then_key! concatenation
;
elseClause
- : else_key concatenation
- -> ^(else_key ^(EXPR concatenation))
+ : else_key^ concatenation
;
searchedCase
@@ -747,8 +732,7 @@
;
searchedWhenClause
- : when_key logicalExpression then_key concatenation
- -> ^(when_key logicalExpression ^(EXPR concatenation))
+ : when_key^ logicalExpression then_key! concatenation
;
quantifiedExpression
@@ -784,18 +768,15 @@
;
castFunction
- : cast_key LEFT_PAREN concatenation as_key dataType RIGHT_PAREN
- -> ^(cast_key ^(EXPR concatenation) dataType)
+ : cast_key^ LEFT_PAREN! concatenation as_key! dataType RIGHT_PAREN!
;
concatFunction
- : concat_key LEFT_PAREN concatenation ( COMMA concatenation )+ RIGHT_PAREN
- -> ^(concat_key ^(EXPR concatenation)+)
+ : concat_key^ LEFT_PAREN! concatenation ( COMMA! concatenation )+ RIGHT_PAREN!
;
substringFunction
- : substring_key LEFT_PAREN concatenation COMMA concatenation ( COMMA concatenation)? RIGHT_PAREN
- -> ^(substring_key ^(EXPR concatenation)+)
+ : substring_key^ LEFT_PAREN! concatenation COMMA! concatenation ( COMMA! concatenation)? RIGHT_PAREN!
;
trimFunction
@@ -808,12 +789,12 @@
k=2;
}
@init {boolean hasSecondExpression = false;}
- : trimSpecification from_key concatenation -> ^(trimSpecification ^(EXPR STRING_LITERAL[" "]) ^(EXPR concatenation))
- | trimSpecification concatenation from_key concatenation -> ^(trimSpecification ^(EXPR concatenation)+)
- | from_key concatenation -> ^(BOTH ^(EXPR STRING_LITERAL[" "]) ^(EXPR concatenation))
+ : trimSpecification from_key concatenation -> ^(trimSpecification STRING_LITERAL[" "] concatenation)
+ | trimSpecification concatenation from_key concatenation -> ^(trimSpecification concatenation+)
+ | from_key concatenation -> ^(BOTH STRING_LITERAL[" "] concatenation)
| cn=concatenation ( from_key concatenation {hasSecondExpression = true;} )?
- -> {hasSecondExpression}? ^(BOTH ^(EXPR concatenation)+)
- -> ^(BOTH ^(EXPR STRING_LITERAL[" "]) ^(EXPR $cn))
+ -> {hasSecondExpression}? ^(BOTH concatenation+)
+ -> ^(BOTH STRING_LITERAL[" "] $cn)
;
trimSpecification
@@ -823,65 +804,55 @@
;
upperFunction
- : upper_key LEFT_PAREN concatenation RIGHT_PAREN
- -> ^(upper_key ^(EXPR concatenation))
+ : upper_key^ LEFT_PAREN! concatenation RIGHT_PAREN!
;
lowerFunction
- : lower_key LEFT_PAREN concatenation RIGHT_PAREN
- -> ^(lower_key ^(EXPR concatenation))
+ : lower_key^ LEFT_PAREN! concatenation RIGHT_PAREN!
;
lengthFunction
- : length_key LEFT_PAREN concatenation RIGHT_PAREN
- -> ^(length_key ^(EXPR concatenation))
+ : length_key^ LEFT_PAREN! concatenation RIGHT_PAREN!
;
locateFunction
- : locate_key LEFT_PAREN concatenation COMMA concatenation ( COMMA concatenation )? RIGHT_PAREN
- -> ^(locate_key ^(EXPR concatenation)+)
+ : locate_key^ LEFT_PAREN! concatenation COMMA! concatenation ( COMMA! concatenation )? RIGHT_PAREN!
;
absFunction
- : abs_key LEFT_PAREN concatenation RIGHT_PAREN
- -> ^(abs_key ^(EXPR concatenation))
+ : abs_key^ LEFT_PAREN! concatenation RIGHT_PAREN!
;
sqrtFunction
- : sqrt_key LEFT_PAREN concatenation RIGHT_PAREN
- -> ^(sqrt_key ^(EXPR concatenation))
+ : sqrt_key^ LEFT_PAREN! concatenation RIGHT_PAREN!
;
modFunction
- : mod_key LEFT_PAREN concatenation COMMA concatenation RIGHT_PAREN
- -> ^(mod_key ^(EXPR concatenation)+)
+ : mod_key^ LEFT_PAREN! concatenation COMMA! concatenation RIGHT_PAREN!
;
sizeFunction
- : size_key LEFT_PAREN propertyReference RIGHT_PAREN
- -> ^(size_key propertyReference)
+ : size_key^ LEFT_PAREN! propertyReference RIGHT_PAREN!
;
indexFunction
- : index_key LEFT_PAREN aliasReference RIGHT_PAREN
- -> ^(index_key aliasReference)
+ : index_key^ LEFT_PAREN! aliasReference RIGHT_PAREN!
;
currentDateFunction
- : current_date_key^ ( LEFT_PAREN! RIGHT_PAREN! )?
+ : current_date_key ( LEFT_PAREN! RIGHT_PAREN! )?
;
currentTimeFunction
- : current_time_key^ ( LEFT_PAREN! RIGHT_PAREN! )?
+ : current_time_key ( LEFT_PAREN! RIGHT_PAREN! )?
;
currentTimestampFunction
- : current_timestamp_key^ ( LEFT_PAREN! RIGHT_PAREN! )?
+ : current_timestamp_key ( LEFT_PAREN! RIGHT_PAREN! )?
;
extractFunction
- : extract_key LEFT_PAREN extractField from_key concatenation RIGHT_PAREN
- -> ^(extract_key extractField ^(EXPR concatenation))
+ : extract_key^ LEFT_PAREN! extractField from_key! concatenation RIGHT_PAREN!
;
extractField
@@ -908,36 +879,27 @@
;
positionFunction
- : position_key LEFT_PAREN concatenation in_key concatenation RIGHT_PAREN
- -> ^(position_key ^(EXPR concatenation)+)
+ : position_key^ LEFT_PAREN! concatenation in_key! concatenation RIGHT_PAREN!
;
charLengthFunction
- : character_length_key LEFT_PAREN concatenation RIGHT_PAREN
- -> ^(character_length_key ^(EXPR concatenation))
+ : character_length_key^ LEFT_PAREN! concatenation RIGHT_PAREN!
;
octetLengthFunction
- : octet_length_key LEFT_PAREN concatenation RIGHT_PAREN
- -> ^(octet_length_key ^(EXPR concatenation))
+ : octet_length_key^ LEFT_PAREN! concatenation RIGHT_PAREN!
;
bitLengthFunction
- : bit_length_key LEFT_PAREN concatenation RIGHT_PAREN
- -> ^(bit_length_key ^(EXPR concatenation))
+ : bit_length_key^ LEFT_PAREN! concatenation RIGHT_PAREN!
;
setFunction
- : ( sum_key^ | avg_key^ | max_key^ | min_key^ ) LEFT_PAREN! additiveExpressionWrapper RIGHT_PAREN!
+ : ( sum_key^ | avg_key^ | max_key^ | min_key^ ) LEFT_PAREN! additiveExpression RIGHT_PAREN!
| count_key LEFT_PAREN ( ASTERISK | ( ( distinct_key | all_key )? countFunctionArguments ) ) RIGHT_PAREN
-> ^(count_key ASTERISK? distinct_key? all_key? countFunctionArguments?)
;
-additiveExpressionWrapper
- : additiveExpression
- -> ^(EXPR additiveExpression)
- ;
-
countFunctionArguments
@init { int type = -1;}
: path
@@ -996,13 +958,12 @@
expressionOrVector
@init {boolean isVectorExp = false;}
: expression (vectorExpr {isVectorExp = true;})?
- -> {isVectorExp}? ^(VECTOR_EXPR ^(EXPR expression) vectorExpr)
- -> ^(EXPR expression)
+ -> {isVectorExp}? ^(VECTOR_EXPR expression vectorExpr)
+ -> expression
;
vectorExpr
- : COMMA expression (COMMA expression)*
- -> ^(EXPR expression)+
+ : COMMA! expression (COMMA! expression)*
;
identPrimary
@@ -1015,8 +976,7 @@
;
exprList
- : expression? (COMMA expression)*
- -> ^(EXPR expression)*
+ : expression? (COMMA! expression)*
;
constant
@@ -1066,8 +1026,8 @@
path
: IDENTIFIER
( DOT^ IDENTIFIER
- | LEFT_SQUARE^ expression RIGHT_SQUARE
- | LEFT_SQUARE^ RIGHT_SQUARE
+ | LEFT_SQUARE^ expression RIGHT_SQUARE!
+ | LEFT_SQUARE^ RIGHT_SQUARE!
)*
;
Added: core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQLTreeWalker.g
===================================================================
--- core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQLTreeWalker.g (rev 0)
+++ core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQLTreeWalker.g 2009-04-16 00:18:25 UTC (rev 16348)
@@ -0,0 +1,505 @@
+tree grammar HQLTreeWalker;
+
+options{
+ tokenVocab=HQL;
+ ASTLabelType=CommonTree;
+ TokenLabelType=CommonToken;
+}
+
+@header {
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ * Portions of SQL grammar parsing copyright (C) 2003 by Lubos Vnuk. All rights
+ * reserved. These portions are distributed under license by Red Hat Middleware
+ * LLC and are covered by the above LGPL notice. If you redistribute this material,
+ * with or without modification, you must preserve this copyright notice in its
+ * entirety.
+ */
+package org.hibernate.sql.ast.phase.hql.parse;
+
+import java.util.LinkedList;
+}
+
+filterStatement[String collectionRole]
+ : ^(QUERY ^(QUERY_SPEC FILTER
+ selectClause? whereClause? ( groupByClause havingClause?)? orderByClause?))
+ ;
+
+statement
+ : updateStatement
+ | deleteStatement
+ | insertStatement
+ | queryStatement
+ ;
+
+updateStatement
+ : ^(UPDATE VERSIONED? ENTITY_NAME ALIAS_NAME? ^(SET assignment+) whereClause?)
+ ;
+
+assignment
+ : ^(EQUALS ^(ASSIGNMENT_FIELD dotIdentifierPath) valueExpression)
+ ;
+
+deleteStatement
+ : ^(DELETE ENTITY_NAME ALIAS_NAME? whereClause?)
+ ;
+
+insertStatement
+ : ^(INSERT intoClause queryStatement)
+ ;
+
+intoClause
+ : ^(INTO ENTITY_NAME ^(INSERTABILITY_SPEC insertablePropertySpecification+ ) )
+ ;
+
+insertablePropertySpecification
+ : ^(INSERTABLE_PROPERTY dotIdentifierPath)
+ ;
+
+queryStatement
+ : ^(QUERY queryExpression orderByClause?)
+ ;
+
+queryExpression
+ : ^(UNION queryExpression queryExpression)
+ | ^(INTERSECT ALL? queryExpression queryExpression)
+ | ^(EXCEPT ALL? queryExpression queryExpression)
+ | querySpec
+ ;
+
+querySpec
+ : ^(QUERY_SPEC selectFrom whereClause? groupByClause? havingClause?)
+ ;
+
+whereClause
+ : ^(WHERE searchCondition)
+ ;
+
+groupByClause
+ : ^(GROUP_BY groupingValue+)
+ ;
+
+groupingValue
+ : ^(GROUPING_VALUE valueExpression COLLATE?)
+ ;
+
+havingClause
+ : ^(HAVING searchCondition)
+ ;
+
+selectFrom
+ : ^(SELECT_FROM fromClause selectClause?)
+ ;
+
+fromClause
+ : ^(FROM persisterSpaces+)
+ ;
+
+persisterSpaces
+ : ^(PERSISTER_SPACE persisterSpace)
+ ;
+
+persisterSpace
+ : persisterSpaceRoot joins*
+ ;
+
+joins
+ : ^(PROPERTY_JOIN joinType FETCH? ALIAS_NAME? PROP_FETCH? (propertyReference|collectionExpression) withClause?)
+ | ^(PERSISTER_JOIN joinType persisterSpaceRoot onClause?)
+ ;
+
+withClause
+ : ^(WITH searchCondition)
+ ;
+
+onClause
+ : ^(ON searchCondition)
+ ;
+
+joinType
+ : CROSS
+ | INNER
+ | (LEFT | RIGHT | FULL) OUTER?
+ ;
+
+persisterSpaceRoot
+ : ^(ENTITY_PERSISTER_REF ENTITY_NAME ALIAS_NAME? PROP_FETCH?)
+ | joins
+ ;
+
+selectClause
+ : ^(SELECT DISTINCT? rootSelectExpression)
+ ;
+
+rootSelectExpression
+ : ^(SELECT_ITEM ^(DYNAMIC_INSTANTIATION dynamicInstantiationArg+))
+ | ^(SELECT_ITEM ^(OBJECT ALIAS_REF))
+ | ^(SELECT_LIST rootSelectExpression+)
+ | valueExpression ALIAS_NAME?
+ ;
+
+dynamicInstantiationArg
+ : ^(DYNAMIC_INSTANTIATION_ARG rootSelectExpression)
+ ;
+
+orderByClause
+ : ^(ORDER_BY sortSpecification+)
+ ;
+
+sortSpecification
+ : ^(SORT_SPEC valueExpression COLLATE? (ASC|DESC)?)
+ ;
+
+searchCondition
+ : ^( OR searchCondition searchCondition )
+ | ^( AND searchCondition searchCondition )
+ | ^( NOT searchCondition )
+ | predicate
+ ;
+
+predicate
+ : ^( EQUALS rowValueConstructor comparativePredicateValue )
+ | ^( NOT_EQUAL rowValueConstructor comparativePredicateValue )
+ | ^( LESS rowValueConstructor comparativePredicateValue )
+ | ^( LESS_EQUAL rowValueConstructor comparativePredicateValue )
+ | ^( GREATER rowValueConstructor comparativePredicateValue )
+ | ^( GREATER_EQUAL rowValueConstructor comparativePredicateValue )
+ | ^( IS_NULL rowValueConstructor )
+ | ^( IS_NOT_NULL rowValueConstructor )
+ | ^( LIKE valueExpression valueExpression escapeSpecification? )
+ | ^( NOT_LIKE valueExpression valueExpression escapeSpecification? )
+ | ^( BETWEEN rowValueConstructor betweenList )
+ | ^( NOT_BETWEEN rowValueConstructor betweenList )
+ | ^( IN rowValueConstructor inPredicateValue )
+ | ^( NOT_IN rowValueConstructor inPredicateValue )
+ | ^( EXISTS (rowValueConstructor|ALIAS_NAME))
+ | rowValueConstructor
+ ;
+
+betweenList
+ : ^( BETWEEN_LIST rowValueConstructor rowValueConstructor )
+ ;
+
+comparativePredicateValue
+ : rowValueConstructor
+ ;
+
+rowValueConstructor
+ : valueExpression
+ ;
+
+escapeSpecification
+ : ^(ESCAPE characterValueExpression)
+ ;
+
+inPredicateValue
+ : ^(IN_LIST valueExpression+)
+ ;
+
+numericValueExpression
+ : valueExpression
+ ;
+
+characterValueExpression
+ : valueExpression
+ ;
+
+datetimeValueExpression
+ : valueExpression
+ ;
+
+valueExpression
+ : ^( DOUBLE_PIPE characterValueExpression+ )
+ | ^( UNARY_MINUS numericValueExpression )
+ | ^( UNARY_PLUS numericValueExpression )
+ | ^( PLUS valueExpression valueExpression )
+ | ^( MINUS valueExpression valueExpression )
+ | ^( ASTERISK numericValueExpression numericValueExpression )
+ | ^( SOLIDUS numericValueExpression numericValueExpression )
+ | ^( VECTOR_EXPR valueExpression+)
+ | ^( SOME (valueExpression|ALIAS_NAME) )
+ | ^( ALL (valueExpression|ALIAS_NAME) )
+ | ^( ANY (valueExpression|ALIAS_NAME) )
+ | valueExpressionPrimary
+ ;
+
+valueExpressionPrimary
+ : ALIAS_REF
+ | caseExpression
+ | function
+ | collectionFunction
+ | collectionExpression
+ | constant
+ | parameter
+ | propertyReference
+ | ^(GENERIC_ELEMENT identPrimary)
+ | queryStatement
+ ;
+
+caseExpression
+ : caseAbbreviation
+ | caseSpecification
+ ;
+
+
+caseAbbreviation
+ : ^(NULLIF valueExpression valueExpression)
+ | ^(COALESCE valueExpression valueExpression*)
+ ;
+
+caseSpecification
+ : simpleCase
+ | searchedCase
+ ;
+
+simpleCase
+ : ^(SIMPLE_CASE valueExpression simpleCaseWhenClause+ elseClause?)
+ ;
+
+simpleCaseWhenClause
+ : ^(WHEN valueExpression valueExpression)
+ ;
+
+elseClause
+ : ^(ELSE valueExpression)
+ ;
+
+searchedCase
+ : ^(SEARCHED_CASE searchedWhenClause+ elseClause?)
+ ;
+
+searchedWhenClause
+ : ^(WHEN searchCondition valueExpression)
+ ;
+
+function
+ : ( standardFunction | setFunction )
+ ;
+
+standardFunction
+ : castFunction
+ | concatFunction
+ | substringFunction
+ | trimFunction
+ | upperFunction
+ | lowerFunction
+ | lengthFunction
+ | locateFunction
+ | absFunction
+ | sqrtFunction
+ | modFunction
+ | sizeFunction
+ | indexFunction
+ | currentDateFunction
+ | currentTimeFunction
+ | currentTimestampFunction
+ | extractFunction
+ | positionFunction
+ | charLengthFunction
+ | octetLengthFunction
+ | bitLengthFunction
+ ;
+
+castFunction
+ : ^(CAST valueExpression IDENTIFIER)
+ ;
+
+concatFunction
+ : ^(CONCAT valueExpression+)
+ ;
+
+substringFunction
+ : ^(SUBSTRING characterValueExpression numericValueExpression numericValueExpression?)
+ ;
+
+trimFunction
+ : ^(TRIM trimOperands)
+ ;
+
+trimOperands
+ : ^((LEADING|TRAILING|BOTH) characterValueExpression characterValueExpression)
+ ;
+
+upperFunction
+ : ^(UPPER characterValueExpression)
+ ;
+
+lowerFunction
+ : ^(LOWER characterValueExpression)
+ ;
+
+lengthFunction
+ : ^(LENGTH characterValueExpression)
+ ;
+
+locateFunction
+ : ^(LOCATE characterValueExpression characterValueExpression numericValueExpression?)
+ ;
+
+absFunction
+ : ^(ABS numericValueExpression)
+ ;
+
+sqrtFunction
+ : ^(SQRT numericValueExpression)
+ ;
+
+modFunction
+ : ^(MOD numericValueExpression numericValueExpression)
+ ;
+
+sizeFunction
+ : ^(SIZE propertyReference)
+ ;
+
+indexFunction
+ : ^(INDEX ALIAS_REF)
+ ;
+
+currentDateFunction
+ : CURRENT_DATE
+ ;
+
+currentTimeFunction
+ : CURRENT_TIME
+ ;
+
+currentTimestampFunction
+ : CURRENT_TIMESTAMP
+ ;
+
+extractFunction
+ : ^(EXTRACT extractField datetimeValueExpression)
+ ;
+
+extractField
+ : datetimeField
+ | timeZoneField
+ ;
+
+datetimeField
+ : YEAR
+ | MONTH
+ | DAY
+ | HOUR
+ | MINUTE
+ | SECOND
+ ;
+
+timeZoneField
+ : TIMEZONE_HOUR
+ | TIMEZONE_MINUTE
+ ;
+
+positionFunction
+ : ^(POSITION characterValueExpression characterValueExpression)
+ ;
+
+charLengthFunction
+ : ^(CHARACTER_LENGTH characterValueExpression)
+ ;
+
+octetLengthFunction
+ : ^(OCTET_LENGTH characterValueExpression)
+ ;
+
+bitLengthFunction
+ : ^(BIT_LENGTH characterValueExpression)
+ ;
+
+setFunction
+ : ^(SUM numericValueExpression)
+ | ^(AVG numericValueExpression)
+ | ^(MAX numericValueExpression)
+ | ^(MIN numericValueExpression)
+ | ^(COUNT (ASTERISK | (DISTINCT|ALL)? countFunctionArguments))
+ ;
+
+countFunctionArguments
+ : collectionExpression
+ | propertyReference
+ | numeric_literal
+ ;
+
+collectionFunction
+ : ^((MAXELEMENT|MAXINDEX|MINELEMENT|MININDEX) collectionPropertyReference)
+ ;
+
+collectionPropertyReference
+ : propertyReference
+ ;
+
+collectionExpression
+ : ^(ELEMENTS propertyReference)
+ | ^(INDICES propertyReference)
+ ;
+
+parameter
+ : NAMED_PARAM
+ | JPA_PARAM
+ | PARAM
+ ;
+
+constant
+ : literal
+ | NULL
+ | TRUE
+ | FALSE
+ ;
+
+literal
+ : numeric_literal
+ | HEX_LITERAL
+ | OCTAL_LITERAL
+ | CHARACTER_LITERAL
+ | STRING_LITERAL
+ ;
+
+numeric_literal
+ : INTEGER_LITERAL
+ | DECIMAL_LITERAL
+ | FLOATING_POINT_LITERAL
+ ;
+
+propertyReference
+ : ^(PROPERTY_REFERENCE path)
+ ;
+
+identPrimary
+ : IDENTIFIER
+ | ^(DOT identPrimary identPrimary )
+ | ^(LEFT_SQUARE identPrimary valueExpression* )
+ | ^(LEFT_PAREN identPrimary valueExpression* )
+ ;
+
+dotIdentifierPath
+ : IDENTIFIER
+ | ^(DOT dotIdentifierPath dotIdentifierPath)
+ ;
+
+path
+ : IDENTIFIER
+ | ^( DOT path path )
+ | ^(LEFT_SQUARE path valueExpression* )
+ ;
Property changes on: core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQLTreeWalker.g
___________________________________________________________________
Name: svn:eol-style
+ native
Added: core/branches/antlr3/src/test/gunit/org/hibernate/sql/ast/phase/hql/parse/TempgUnitHQLGrammar.testsuite
===================================================================
--- core/branches/antlr3/src/test/gunit/org/hibernate/sql/ast/phase/hql/parse/TempgUnitHQLGrammar.testsuite (rev 0)
+++ core/branches/antlr3/src/test/gunit/org/hibernate/sql/ast/phase/hql/parse/TempgUnitHQLGrammar.testsuite 2009-04-16 00:18:25 UTC (rev 16348)
@@ -0,0 +1,1684 @@
+gunit HQL;
+
+@header{
+package org.hibernate.sql.ast.phase.hql.parse;
+}
+
+
+statement:
+
+/*
+SELECT/FROM STATEMENT
+*/
+//testSimpleFrom
+"from com.acme.EntityName e" OK
+//testConstantUsage
+"from com.acme.EntityName where prop = org.hibernate.sql.ast.phase.hql.parse.ParserTest.CONSTANT" OK
+"from com.acme.EntityName where prop = compProp.subProp" OK
+//testVariousPropertyReferences
+"from A a where b = 1" OK
+"from A a where a.b.c = 1" OK
+"from X x where y[1].z = 2" OK
+"from X x where x.y[1].z = 2" OK
+//testEntityNamePathWithKeyword
+"from org.hibernate.test.Inner" OK
+//testWhereClauseIdentPrimaryWithEmbeddedKeyword
+"from org.hibernate.test.Inner i where i.outer.inner.middle = 'xyz'" OK
+//testDynamicInstantiation
+"select new list(a, mate) from Animal a join a.mate as mate" OK
+//testListOrMapKeywordReference
+"select p from eg.NameList nl, eg.Person p where p.name = some elements(nl.names)" OK
+"select p from eg.NameList list, eg.Person p where p.name = some elements(list.names)" OK
+"select p from eg.NameList map, eg.Person p where p.name = some elements(map.names)" OK
+//testExplicitPropertyJoin
+"from eg.Cat as cat inner join fetch cat.mate as m fetch all properties left join fetch cat.kittens as k" OK
+// tests copied over from org.hibernate.test.hql.HqlParserTest ~~~~~~~~~~~~
+"from Animal a where a in (from Cat union from Dog)" OK
+/**
+ * Section 9.2 - from *
+ */
+"from eg.Cat" OK
+"from eg.Cat as cat" OK
+"from eg.Cat cat" OK
+"from Formula, Parameter" OK
+"from Formula as form, Parameter as param" OK
+/**
+ * Section 9.3 - Associations and joins *
+ */
+"from eg.Cat as cat inner join cat.mate as mate left outer join cat.kittens as kitten" OK
+"from eg.Cat as cat left join cat.mate.kittens as kittens" OK
+"from Formula form full join form.parameter param" OK
+"from eg.Cat as cat join cat.mate as mate left join cat.kittens as kitten" OK
+"from eg.Cat as cat inner join fetch cat.mate left join fetch cat.kittens" OK
+/**
+ * Section 9.4 - Select *
+ */
+"select mate from eg.Cat as cat inner join cat.mate as mate" OK
+"select cat.mate from eg.Cat cat" OK
+"select elements(cat.kittens) from eg.Cat cat" OK
+"select cat.name from eg.DomesticCat cat where cat.name like 'fri%'" OK
+"select cust.name.firstName from Customer as cust" OK
+"select mother, offspr, mate.name from eg.DomesticCat as mother inner join mother.mate as mate left outer join mother.kittens as offspr" OK
+"select new Family(mother, mate, offspr) from eg.DomesticCat as mother join mother.mate as mate left join mother.kittens as offspr" OK
+/**
+ * Section 9.5 - Aggregate functions *
+ */
+"select avg(cat.weight), sum(cat.weight), max(cat.weight), count(cat) from eg.Cat cat" OK
+"select cat, count( elements(cat.kittens) ) from eg.Cat cat group by cat" OK
+"select distinct cat.name from eg.Cat cat" OK
+"select count(distinct cat.name), count(cat) from eg.Cat cat" OK
+/**
+ * Section 9.6 - Polymorphism *
+ */
+"from java.lang.Object o" OK
+"from eg.Named n, eg.Named m where n.name = m.name" OK
+/**
+ * Section 9.7 - Where *
+ */
+"from eg.Cat as cat where cat.name='Fritz'" OK
+"select foo from eg.Foo foo, eg.Bar bar where foo.startDate = bar.date" OK
+"from eg.Cat cat where cat.mate.name is not null" OK
+"from eg.Cat cat, eg.Cat rival where cat.mate = rival.mate" OK
+"select cat, mate from eg.Cat cat, eg.Cat mate where cat.mate = mate" OK
+"from eg.Cat as cat where cat.id = 123" OK
+"from eg.Cat as cat where cat.mate.id = 69" OK
+"from bank.Person person where person.id.country = 'AU' and person.id.medicareNumber = 123456" OK
+"from bank.Account account where account.owner.id.country = 'AU' and account.owner.id.medicareNumber = 123456" OK
+"from eg.Cat cat where cat.class = eg.DomesticCat" OK
+"from eg.AuditLog log, eg.Payment payment where log.item.class = 'eg.Payment' and log.item.id = payment.id" OK
+/**
+ * Section 9.8 - Expressions *
+ */
+"from eg.DomesticCat cat where cat.name between 'A' and 'B'" OK
+"from eg.DomesticCat cat where cat.name in ( 'Foo', 'Bar', 'Baz' )" OK
+"from eg.DomesticCat cat where cat.name not between 'A' and 'B'" OK
+"from eg.DomesticCat cat where cat.name not in ( 'Foo', 'Bar', 'Baz' )" OK
+"from eg.Cat cat where cat.kittens.size > 0" OK
+"from eg.Cat cat where size(cat.kittens) > 0" OK
+//"from Calendar cal where cal.holidays.maxElement > current date" OK
+"from Order order where maxindex(order.items) > 100" OK
+"from Order order where minelement(order.items) > 10000" OK
+"from Order ord where maxindex(ord.items) > 100" OK
+"from Order ord where minelement(ord.items) > 10000" OK
+"select mother from eg.Cat as mother, eg.Cat as kit where kit in elements(foo.kittens)" OK
+"select p from eg.NameList list, eg.Person p where p.name = some elements(list.names)" OK
+"from eg.Cat cat where exists elements(cat.kittens)" OK
+"from eg.Player p where 3 > all elements(p.scores)" OK
+"from eg.Show show where 'fizard' in indices(show.acts)" OK
+"from Order order where order.items[0].id = 1234" OK
+"select person from Person person, Calendar calendar where calendar.holidays['national day'] = person.birthDay and person.nationality.calendar = calendar" OK
+"select item from Item item, Order order where order.items[ order.deliveredItemIndices[0] ] = item and order.id = 11" OK
+"select item from Item item, Order order where order.items[ maxindex(order.items) ] = item and order.id = 11" OK
+"from Order ord where ord.items[0].id = 1234" OK
+"select item from Item item, Order ord where ord.items[ ord.deliveredItemIndices[0] ] = item and ord.id = 11" OK
+"select item from Item item, Order ord where ord.items[ maxindex(ord.items) ] = item and ord.id = 11" OK
+"select item from Item item, Order ord where ord.items[ size(ord.items) - 1 ] = item" OK
+"from eg.DomesticCat cat where upper(cat.name) like 'FRI%'" OK
+"select cust from Product prod, Store store inner join store.customers cust where prod.name = 'widget' and store.location.name in ( 'Melbourne', 'Sydney' ) and prod = all elements(cust.currentOrder.lineItems)" OK
+//testDocoExamples99
+"from eg.DomesticCat cat order by cat.name asc, cat.weight desc, cat.birthdate" OK
+//testDocoExamples910
+"select cat.color, sum(cat.weight), count(cat) from eg.Cat cat group by cat.color" OK
+"select foo.id, avg( elements(foo.names) ), max( indices(foo.names) ) from eg.Foo foo group by foo.id" OK
+"select cat.color, sum(cat.weight), count(cat) from eg.Cat cat group by cat.color having cat.color in (eg.Color.TABBY, eg.Color.BLACK)" OK
+"select cat from eg.Cat cat join cat.kittens kitten group by cat having avg(kitten.weight) > 100 order by count(kitten) asc, sum(kitten.weight) desc" OK
+//testDocoExamples911
+"from eg.Cat as fatcat where fatcat.weight > (select avg(cat.weight) from eg.DomesticCat cat)" OK
+"from eg.DomesticCat as cat where cat.name = some (select name.nickName from eg.Name as name)" OK
+"from eg.Cat as cat where not exists (from eg.Cat as mate where mate.mate = cat)" OK
+"from eg.DomesticCat as cat where cat.name not in (select name.nickName from eg.Name as name)" OK
+//testDocoExamples912
+<<select ord.id, sum(price.amount), count(item)
+ from Order as ord join ord.lineItems as item
+ join item.product as product, Catalog as catalog
+ join catalog.prices as price
+ where ord.paid = false
+ and ord.customer = :customer
+ and price.product = product
+ and catalog.effectiveDate < sysdate
+ and catalog.effectiveDate >= all (
+ select cat.effectiveDate from Catalog as cat where cat.effectiveDate < sysdate)
+ group by ord
+ having sum(price.amount) > :minAmount
+ order by sum(price.amount) desc>> OK
+<<select ord.id, sum(price.amount), count(item)
+ from Order as ord join ord.lineItems as item join item.product as product,
+ Catalog as catalog join catalog.prices as price
+ where ord.paid = false and ord.customer = :customer
+ and price.product = product and catalog = :currentCatalog
+ group by ord having sum(price.amount) > :minAmount
+ order by sum(price.amount) desc>> OK
+<<select count(payment), status.name
+ from Payment as payment
+ join payment.currentStatus as status
+ join payment.statusChanges as statusChange
+ where payment.status.name <> PaymentStatus.AWAITING_APPROVAL
+ or (
+ statusChange.timeStamp = (
+ select max(change.timeStamp)
+ from PaymentStatusChange change
+ where change.payment = payment
+ )
+ and statusChange.user <> :currentUser
+ )
+ group by status.name, status.sortOrder
+ order by status.sortOrder>> OK
+<<select count(payment), status.name
+ from Payment as payment
+ join payment.currentStatus as status
+ where payment.status.name <> PaymentStatus.AWAITING_APPROVAL
+ or payment.statusChanges[ maxIndex(payment.statusChanges) ].user <> :currentUser
+ group by status.name, status.sortOrder
+ order by status.sortOrder>> OK
+<<select account, payment
+ from Account as account
+ left outer join account.payments as payment
+ where :currentUser in elements(account.holder.users)
+ and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, PaymentStatus.UNPAID)
+ order by account.type.sortOrder, account.accountNumber, payment.dueDate>> OK
+<<select account, payment
+ from Account as account
+ join account.holder.users as user
+ left outer join account.payments as payment
+ where :currentUser = user
+ and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, PaymentStatus.UNPAID)
+ order by account.type.sortOrder, account.accountNumber, payment.dueDate>> OK
+//testExamples1
+"select new org.hibernate.test.S(s.count, s.address) from s in class Simple" OK
+"select s.name, sysdate, trunc(s.pay), round(s.pay) from s in class Simple" OK
+"select abs(round(s.pay)) from s in class Simple" OK
+"select trunc(round(sysdate)) from s in class Simple" OK
+//testMultipleActualParameters
+"select round(s.pay, 2) from s" OK
+//testMultipleFromClasses
+"from eg.mypackage.Cat qat, com.toadstool.Foo f" OK
+"from eg.mypackage.Cat qat, org.jabberwocky.Dipstick" OK
+//testFromWithJoin
+"from eg.mypackage.Cat qat, com.toadstool.Foo f join net.sf.blurb.Blurb" OK
+"from eg.mypackage.Cat qat left join com.multijoin.JoinORama , com.toadstool.Foo f join net.sf.blurb.Blurb" OK
+//testSelect
+"select f from eg.mypackage.Cat qat, com.toadstool.Foo f join net.sf.blurb.Blurb" OK
+"select distinct bar from eg.mypackage.Cat qat left join com.multijoin.JoinORama as bar, com.toadstool.Foo f join net.sf.blurb.Blurb" OK
+"select count(*) from eg.mypackage.Cat qat" OK
+"select avg(qat.weight) from eg.mypackage.Cat qat" OK
+//testWhere
+"from eg.mypackage.Cat qat where qat.name like '%fluffy%' or qat.toes > 5" OK
+"from eg.mypackage.Cat qat where not qat.name like '%fluffy%' or qat.toes > 5" OK
+"from eg.mypackage.Cat qat where not qat.name not like '%fluffy%'" OK
+"from eg.mypackage.Cat qat where qat.name in ('crater','bean','fluffy')" OK
+"from eg.mypackage.Cat qat where qat.name not in ('crater','bean','fluffy')" OK
+//testGroupBy
+"from eg.mypackage.Cat qat group by qat.breed" OK
+"from eg.mypackage.Cat qat group by qat.breed, qat.eyecolor" OK
+//testOrderBy
+"from eg.mypackage.Cat qat order by avg(qat.toes)" OK
+"from Animal an order by sqrt(an.bodyWeight)/2" OK
+//testDoubleLiteral
+"from eg.Cat as tinycat where fatcat.weight < 3.1415" OK
+"from eg.Cat as enormouscat where fatcat.weight > 3.1415e3" OK
+//testComplexConstructor
+"select new Foo(count(bar)) from bar" OK
+"select new Foo(count(bar),(select count(*) from doofus d where d.gob = 'fat' )) from bar" OK
+//testInNotIn
+"from foo where foo.bar in ('a' , 'b', 'c')" OK
+"from foo where foo.bar not in ('a' , 'b', 'c')" OK
+//testOperatorPrecedence
+"from foo where foo.bar = 123 + foo.baz * foo.not" OK
+"from foo where foo.bar like 'testzzz' || foo.baz or foo.bar in ('duh', 'gob')" OK
+//testUnitTestHql
+"select foo from foo in class org.hibernate.test.Foo, fee in class org.hibernate.test.Fee where foo.dependent = fee order by foo.string desc, foo.component.count asc, fee.id" OK
+"select foo.foo, foo.dependent from foo in class org.hibernate.test.Foo order by foo.foo.string desc, foo.component.count asc, foo.dependent.id" OK
+"select foo from foo in class org.hibernate.test.Foo order by foo.dependent.id, foo.dependent.fi" OK
+"select one from one in class org.hibernate.test.One order by one.value asc" OK
+"select many.one from many in class org.hibernate.test.Many order by many.one.value asc, many.one.id" OK
+"select foo.id from org.hibernate.test.Foo foo where foo.joinedProp = 'foo'" OK
+"from org.hibernate.test.Foo foo inner join fetch foo.foo" OK
+"from org.hibernate.test.Baz baz left outer join fetch baz.fooToGlarch" OK
+"select foo.foo.foo.string from foo in class org.hibernate.test.Foo where foo.foo = 'bar'" OK
+"select foo.foo.foo.foo.string from foo in class org.hibernate.test.Foo where foo.foo.foo = 'bar'" OK
+"select foo.foo.foo.string from foo in class org.hibernate.test.Foo where foo.foo.foo.foo.string = 'bar'" OK
+"select foo.string from foo in class org.hibernate.test.Foo where foo.foo.foo = 'bar' and foo.foo.foo.foo = 'baz'" OK
+"select foo.string from foo in class org.hibernate.test.Foo where foo.foo.foo.foo.string = 'a' and foo.foo.string = 'b'" OK
+"from org.hibernate.test.Foo as foo where foo.component.glarch.name is not null" OK
+"from org.hibernate.test.Foo as foo left outer join foo.component.glarch as glarch where glarch.name = 'foo'" OK
+"from org.hibernate.test.Foo" OK
+"from org.hibernate.test.Foo foo left outer join foo.foo" OK
+"from org.hibernate.test.Foo, org.hibernate.test.Bar" OK
+"from org.hibernate.test.Baz baz left join baz.fooToGlarch, org.hibernate.test.Bar bar join bar.foo" OK
+"from org.hibernate.test.Baz baz left join baz.fooToGlarch join baz.fooSet" OK
+"from org.hibernate.test.Baz baz left join baz.fooToGlarch join fetch baz.fooSet foo left join fetch foo.foo" OK
+"from foo in class org.hibernate.test.Foo where foo.string='osama bin laden' and foo.boolean = true order by foo.string asc, foo.component.count desc" OK
+"from foo in class org.hibernate.test.Foo where foo.string='osama bin laden' order by foo.string asc, foo.component.count desc" OK
+"select foo.foo from foo in class org.hibernate.test.Foo" OK
+"from foo in class org.hibernate.test.Foo where foo.component.count is null order by foo.component.count" OK
+"from foo in class org.hibernate.test.Foo where foo.component.name='foo'" OK
+"select distinct foo.component.name, foo.component.name from foo in class org.hibernate.test.Foo where foo.component.name='foo'" OK
+"select distinct foo.component.name, foo.id from foo in class org.hibernate.test.Foo where foo.component.name='foo'" OK
+"from foo in class org.hibernate.test.Foo where foo.id=?" OK
+"from foo in class org.hibernate.test.Foo where foo.key=?" OK
+"select foo.foo from foo in class org.hibernate.test.Foo where foo.string='fizard'" OK
+"from foo in class org.hibernate.test.Foo where foo.component.subcomponent.name='bar'" OK
+"select foo.foo from foo in class org.hibernate.test.Foo where foo.foo.id=?" OK
+"from foo in class org.hibernate.test.Foo where foo.foo = ?" OK
+"from bar in class org.hibernate.test.Bar where bar.string='a string' or bar.string='a string'" OK
+"select foo.component.name, elements(foo.component.importantDates) from foo in class org.hibernate.test.Foo where foo.foo.id=?" OK
+"select max(elements(foo.component.importantDates)) from foo in class org.hibernate.test.Foo group by foo.id" OK
+"select foo.foo.foo.foo from foo in class org.hibernate.test.Foo, foo2 in class org.hibernate.test.Foo where foo = foo2.foo and not not ( not foo.string='fizard' ) and foo2.string between 'a' and (foo.foo.string) and ( foo2.string in ( 'fiz', 'blah') or 1=1 )" OK
+"from foo in class org.hibernate.test.Foo where foo.string='from BoogieDown -tinsel town =!@#$^&*())'" OK
+"from foo in class org.hibernate.test.Foo where not foo.string='foo''bar'" OK
+"from foo in class org.hibernate.test.Foo where foo.component.glarch.next is null" OK
+"from bar in class org.hibernate.test.Bar where bar.baz.count=667 and bar.baz.count!=123 and not bar.baz.name='1-E-1'" OK
+"from i in class org.hibernate.test.Bar where i.baz.name='Bazza'" OK
+"select count(distinct foo.foo) from foo in class org.hibernate.test.Foo" OK
+"select count(foo.foo.boolean) from foo in class org.hibernate.test.Foo" OK
+"select count(*), foo.int from foo in class org.hibernate.test.Foo group by foo.int" OK
+"select sum(foo.foo.int) from foo in class org.hibernate.test.Foo" OK
+"select count(foo) from foo in class org.hibernate.test.Foo where foo.id=?" OK
+"from foo in class org.hibernate.test.Foo where foo.boolean = ?" OK
+"select new Foo(fo.x) from org.hibernate.test.Fo fo" OK
+"select new Foo(fo.integer) from org.hibernate.test.Foo fo" OK
+"select new Foo(fo.x) from org.hibernate.test.Foo fo" OK
+"select foo.long, foo.component.name, foo, foo.foo from foo in class org.hibernate.test.Foo" OK
+"select avg(foo.float), max(foo.component.name), count(distinct foo.id) from foo in class org.hibernate.test.Foo" OK
+"select foo.long, foo.component, foo, foo.foo from foo in class org.hibernate.test.Foo" OK
+"from o in class org.hibernate.test.MoreStuff" OK
+"from o in class org.hibernate.test.Many" OK
+"from o in class org.hibernate.test.Fee" OK
+"from o in class org.hibernate.test.Qux" OK
+"from o in class org.hibernate.test.Y" OK
+"from o in class org.hibernate.test.Fumm" OK
+"from o in class org.hibernate.test.X" OK
+"from o in class org.hibernate.test.Simple" OK
+"from o in class org.hibernate.test.Location" OK
+"from o in class org.hibernate.test.Holder" OK
+"from o in class org.hibernate.test.Part" OK
+"from o in class org.hibernate.test.Baz" OK
+"from o in class org.hibernate.test.Vetoer" OK
+"from o in class org.hibernate.test.Sortable" OK
+"from o in class org.hibernate.test.Contained" OK
+"from o in class org.hibernate.test.Stuff" OK
+"from o in class org.hibernate.test.Immutable" OK
+"from o in class org.hibernate.test.Container" OK
+"from o in class org.hibernate.test.X$XX" OK
+"from o in class org.hibernate.test.One" OK
+"from o in class org.hibernate.test.Foo" OK
+"from o in class org.hibernate.test.Fo" OK
+"from o in class org.hibernate.test.Glarch" OK
+"from o in class org.hibernate.test.Fum" OK
+"from n in class org.hibernate.test.Holder" OK
+"from n in class org.hibernate.test.Baz" OK
+"from n in class org.hibernate.test.Bar" OK
+"from n in class org.hibernate.test.Glarch" OK
+"from n in class org.hibernate.test.Holder where n.name is not null" OK
+"from n in class org.hibernate.test.Baz where n.name is not null" OK
+"from n in class org.hibernate.test.Bar where n.name is not null" OK
+"from n in class org.hibernate.test.Glarch where n.name is not null" OK
+"from n0 in class org.hibernate.test.Holder, n1 in class org.hibernate.test.Holder where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Baz, n1 in class org.hibernate.test.Holder where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Bar, n1 in class org.hibernate.test.Holder where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Glarch, n1 in class org.hibernate.test.Holder where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Holder, n1 in class org.hibernate.test.Baz where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Baz, n1 in class org.hibernate.test.Baz where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Bar, n1 in class org.hibernate.test.Baz where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Glarch, n1 in class org.hibernate.test.Baz where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Holder, n1 in class org.hibernate.test.Bar where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Baz, n1 in class org.hibernate.test.Bar where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Bar, n1 in class org.hibernate.test.Bar where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Glarch, n1 in class org.hibernate.test.Bar where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Holder, n1 in class org.hibernate.test.Glarch where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Baz, n1 in class org.hibernate.test.Glarch where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Bar, n1 in class org.hibernate.test.Glarch where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Glarch, n1 in class org.hibernate.test.Glarch where n0.name = n1.name" OK
+"from n in class org.hibernate.test.Holder where n.name = :name" OK
+"select baz.code, min(baz.count) from baz in class org.hibernate.test.Baz group by baz.code" OK
+"selecT baz from baz in class org.hibernate.test.Baz where baz.stringDateMap['foo'] is not null or baz.stringDateMap['bar'] = ?" OK
+"select baz from baz in class org.hibernate.test.Baz where baz.stringDateMap['now'] is not null" OK
+"select baz from baz in class org.hibernate.test.Baz where baz.stringDateMap['now'] is not null and baz.stringDateMap['big bang'] < baz.stringDateMap['now']" OK
+"select index(date) from org.hibernate.test.Baz baz join baz.stringDateMap as date" OK
+"select index(date) from org.hibernate.test.Baz baz join baz.stringDateMap date" OK
+"from foo in class org.hibernate.test.Foo where foo.integer not between 1 and 5 and foo.string not in ('cde', 'abc') and foo.string is not null and foo.integer<=3" OK
+"from org.hibernate.test.Baz baz inner join baz.collectionComponent.nested.foos foo where foo.string is null" OK
+"from org.hibernate.test.Baz baz inner join baz.fooSet where '1' in (from baz.fooSet foo where foo.string is not null)" OK
+"from org.hibernate.test.Baz baz where 'a' in elements(baz.collectionComponent.nested.foos) and 1.0 in elements(baz.collectionComponent.nested.floats)" OK
+"from org.hibernate.test.Foo foo join foo.foo where foo.foo in ('1','2','3')" OK
+"select foo.foo from org.hibernate.test.Foo foo where foo.foo in ('1','2','3')" OK
+"select foo.foo.string from org.hibernate.test.Foo foo where foo.foo in ('1','2','3')" OK
+"select foo.foo.string from org.hibernate.test.Foo foo where foo.foo.string in ('1','2','3')" OK
+"select foo.foo.long from org.hibernate.test.Foo foo where foo.foo.string in ('1','2','3')" OK
+"select count(*) from org.hibernate.test.Foo foo where foo.foo.string in ('1','2','3') or foo.foo.long in (1,2,3)" OK
+"select count(*) from org.hibernate.test.Foo foo where foo.foo.string in ('1','2','3') group by foo.foo.long" OK
+"from org.hibernate.test.Foo foo1 left join foo1.foo foo2 left join foo2.foo where foo1.string is not null" OK
+"from org.hibernate.test.Foo foo1 left join foo1.foo.foo where foo1.string is not null" OK
+"from org.hibernate.test.Foo foo1 left join foo1.foo foo2 left join foo1.foo.foo foo3 where foo1.string is not null" OK
+"select foo.formula from org.hibernate.test.Foo foo where foo.formula > 0" OK
+"from org.hibernate.test.Foo as foo join foo.foo as foo2 where foo2.id >'a' or foo2.id <'a'" OK
+"from org.hibernate.test.Holder" OK
+"from org.hibernate.test.Baz baz left outer join fetch baz.manyToAny" OK
+"from org.hibernate.test.Baz baz join baz.manyToAny" OK
+"select baz from org.hibernate.test.Baz baz join baz.manyToAny a where index(a) = 0" OK
+"select bar from org.hibernate.test.Bar bar where bar.baz.stringDateMap['now'] is not null" OK
+"select bar from org.hibernate.test.Bar bar join bar.baaz b where b.stringDateMap['big bang'] < b.stringDateMap['now'] and b.stringDateMap['now'] is not null" OK
+"select bar from org.hibernate.test.Bar bar where bar.baz.stringDateMap['big bang'] < bar.baz.stringDateMap['now'] and bar.baz.stringDateMap['now'] is not null" OK
+"select foo.string, foo.component, foo.id from org.hibernate.test.Bar foo" OK
+"select elements(baz.components) from org.hibernate.test.Baz baz" OK
+"select bc.name from org.hibernate.test.Baz baz join baz.components bc" OK
+"from org.hibernate.test.Foo foo where foo.integer < 10 order by foo.string" OK
+"from org.hibernate.test.Fee" OK
+"from org.hibernate.test.Holder h join h.otherHolder oh where h.otherHolder.name = 'bar'" OK
+"from org.hibernate.test.Baz baz join baz.fooSet foo join foo.foo.foo foo2 where foo2.string = 'foo'" OK
+"from org.hibernate.test.Baz baz join baz.fooArray foo join foo.foo.foo foo2 where foo2.string = 'foo'" OK
+"from org.hibernate.test.Baz baz join baz.stringDateMap date where index(date) = 'foo'" OK
+"from org.hibernate.test.Baz baz join baz.topGlarchez g where index(g) = 'A'" OK
+"select index(g) from org.hibernate.test.Baz baz join baz.topGlarchez g" OK
+"from org.hibernate.test.Baz baz left join baz.stringSet" OK
+"from org.hibernate.test.Baz baz join baz.stringSet str where str='foo'" OK
+"from org.hibernate.test.Baz baz left join fetch baz.stringSet" OK
+"from org.hibernate.test.Baz baz join baz.stringSet string where string='foo'" OK
+"from org.hibernate.test.Baz baz inner join baz.components comp where comp.name='foo'" OK
+"from org.hibernate.test.Glarch g inner join g.fooComponents comp where comp.fee is not null" OK
+"from org.hibernate.test.Glarch g inner join g.fooComponents comp join comp.fee fee where fee.count > 0" OK
+"from org.hibernate.test.Glarch g inner join g.fooComponents comp where comp.fee.count is not null" OK
+"from org.hibernate.test.Baz baz left join fetch baz.fooBag" OK
+"from org.hibernate.test.Glarch" OK
+"from org.hibernate.test.Baz baz left join fetch baz.sortablez order by baz.name asc" OK
+"from org.hibernate.test.Baz baz order by baz.name asc" OK
+"from org.hibernate.test.Foo foo, org.hibernate.test.Baz baz left join fetch baz.fees" OK
+"from org.hibernate.test.Foo foo, org.hibernate.test.Bar bar" OK
+"from org.hibernate.test.Foo foo" OK
+"from org.hibernate.test.Foo foo, org.hibernate.test.Bar bar, org.hibernate.test.Bar bar2" OK
+"from org.hibernate.test.X x" OK
+"select distinct foo from org.hibernate.test.Foo foo" OK
+"from org.hibernate.test.Glarch g where g.multiple.glarch=g and g.multiple.count=12" OK
+"from org.hibernate.test.Bar bar left join bar.baz baz left join baz.cascadingBars b where bar.name like 'Bar %'" OK
+"select bar, b from org.hibernate.test.Bar bar left join bar.baz baz left join baz.cascadingBars b where bar.name like 'Bar%'" OK
+"select bar, b from org.hibernate.test.Bar bar left join bar.baz baz left join baz.cascadingBars b where ( bar.name in (:nameList0_, :nameList1_, :nameList2_) or bar.name in (:nameList0_, :nameList1_, :nameList2_) ) and bar.string = :stringVal" OK
+"select bar, b from org.hibernate.test.Bar bar inner join bar.baz baz inner join baz.cascadingBars b where bar.name like 'Bar%'" OK
+"select bar, b from org.hibernate.test.Bar bar left join bar.baz baz left join baz.cascadingBars b where bar.name like :name and b.name like :name" OK
+"select bar from org.hibernate.test.Bar as bar where bar.x > ? or bar.short = 1 or bar.string = 'ff ? bb'" OK
+"select bar from org.hibernate.test.Bar as bar where bar.string = ' ? ' or bar.string = '?'" OK
+"from org.hibernate.test.Baz baz, baz.fooArray foo" OK
+"from s in class org.hibernate.test.Stuff where s.foo.id = ? and s.id.id = ? and s.moreStuff.id.intId = ? and s.moreStuff.id.stringId = ?" OK
+"from s in class org.hibernate.test.Stuff where s.foo.id = ? and s.id.id = ? and s.moreStuff.name = ?" OK
+"from s in class org.hibernate.test.Stuff where s.foo.string is not null" OK
+"from s in class org.hibernate.test.Stuff where s.foo > '0' order by s.foo" OK
+"from ms in class org.hibernate.test.MoreStuff" OK
+"from fee in class org.hibernate.test.Fee" OK
+"select new Result(foo.string, foo.long, foo.integer) from foo in class org.hibernate.test.Foo" OK
+"select new Result( baz.name, foo.long, count(elements(baz.fooArray)) ) from org.hibernate.test.Baz baz join baz.fooArray foo group by baz.name, foo.long" OK
+"select new Result( baz.name, max(foo.long), count(foo) ) from org.hibernate.test.Baz baz join baz.fooArray foo group by baz.name" OK
+"select max( elements(bar.baz.fooArray) ) from org.hibernate.test.Bar as bar" OK
+"from org.hibernate.test.Baz baz left join baz.fooToGlarch join fetch baz.fooArray foo left join fetch foo.foo" OK
+"select baz.name from org.hibernate.test.Bar bar inner join bar.baz baz inner join baz.fooSet foo where baz.name = bar.string" OK
+"SELECT baz.name FROM org.hibernate.test.Bar AS bar INNER JOIN bar.baz AS baz INNER JOIN baz.fooSet AS foo WHERE baz.name = bar.string" OK
+"select baz.name from org.hibernate.test.Bar bar join bar.baz baz left outer join baz.fooSet foo where baz.name = bar.string" OK
+"select baz.name from org.hibernate.test.Bar bar, bar.baz baz, baz.fooSet foo where baz.name = bar.string" OK
+"SELECT baz.name FROM org.hibernate.test.Bar AS bar, bar.baz AS baz, baz.fooSet AS foo WHERE baz.name = bar.string" OK
+"select baz.name from org.hibernate.test.Bar bar left join bar.baz baz left join baz.fooSet foo where baz.name = bar.string" OK
+"select foo.string from org.hibernate.test.Bar bar left join bar.baz.fooSet foo where bar.string = foo.string" OK
+"select baz.name from org.hibernate.test.Bar bar left join bar.baz baz left join baz.fooArray foo where baz.name = bar.string" OK
+"select foo.string from org.hibernate.test.Bar bar left join bar.baz.fooArray foo where bar.string = foo.string" OK
+"select foo from bar in class org.hibernate.test.Bar inner join bar.baz as baz inner join baz.fooSet as foo" OK
+"select foo from bar in class org.hibernate.test.Bar inner join bar.baz.fooSet as foo" OK
+"select foo from bar in class org.hibernate.test.Bar, bar.baz as baz, baz.fooSet as foo" OK
+"select foo from bar in class org.hibernate.test.Bar, bar.baz.fooSet as foo" OK
+"from org.hibernate.test.Bar bar join bar.baz.fooArray foo" OK
+"from bar in class org.hibernate.test.Bar, foo in elements( bar.baz.fooArray )" OK
+"select one.id, elements(one.manies) from one in class org.hibernate.test.One" OK
+"select max( elements(one.manies) ) from one in class org.hibernate.test.One" OK
+"select one, elements(one.manies) from one in class org.hibernate.test.One" OK
+"select one, max(elements(one.manies)) from one in class org.hibernate.test.One group by one" OK
+"select elements(baz.fooArray) from baz in class org.hibernate.test.Baz where baz.id=?" OK
+"select indices(baz.fooArray) from baz in class org.hibernate.test.Baz where baz.id=?" OK
+"select baz, max(elements(baz.timeArray)) from baz in class org.hibernate.test.Baz group by baz" OK
+"select baz, baz.stringSet.size, count(distinct elements(baz.stringSet)), max(elements(baz.stringSet)) from baz in class org.hibernate.test.Baz group by baz" OK
+"select max( elements(baz.timeArray) ) from baz in class org.hibernate.test.Baz where baz.id=?" OK
+"select max(elements(baz.stringSet)) from baz in class org.hibernate.test.Baz where baz.id=?" OK
+"select size(baz.stringSet) from baz in class org.hibernate.test.Baz where baz.id=?" OK
+"from org.hibernate.test.Foo foo where foo.component.glarch.id is not null" OK
+"from baz in class org.hibernate.test.Baz" OK
+"select elements(baz.stringArray) from baz in class org.hibernate.test.Baz" OK
+"select elements(baz.stringList) from baz in class org.hibernate.test.Baz" OK
+"select count(*) from org.hibernate.test.Bar" OK
+"select count(*) from b in class org.hibernate.test.Bar" OK
+"from g in class org.hibernate.test.Glarch" OK
+"select baz, baz from baz in class org.hibernate.test.Baz" OK
+"select baz from baz in class org.hibernate.test.Baz order by baz" OK
+"from bar in class org.hibernate.test.Bar" OK
+"from f in class org.hibernate.test.Foo" OK
+"from q in class org.hibernate.test.Qux" OK
+"select foo from foo in class org.hibernate.test.Foo where foo.string='foo bar'" OK
+"from foo in class org.hibernate.test.Foo order by foo.string, foo.date" OK
+"from foo in class org.hibernate.test.Foo where foo.class='B'" OK
+"from foo in class org.hibernate.test.Foo where foo.class=Bar" OK
+"select bar from bar in class org.hibernate.test.Bar, foo in class org.hibernate.test.Foo where bar.string = foo.string and not bar=foo" OK
+"from foo in class org.hibernate.test.Foo where foo.string='foo bar'" OK
+"select foo from foo in class org.hibernate.test.Foo" OK
+"from bar in class org.hibernate.test.Bar where bar.barString='bar bar'" OK
+"from t in class org.hibernate.test.Trivial" OK
+"from foo in class org.hibernate.test.Foo where foo.date = ?" OK
+"from q in class org.hibernate.test.Qux where q.stuff is null" OK
+"from q in class org.hibernate.test.Qux where q.stuff=?" OK
+"from g in class org.hibernate.test.Glarch where g.version=2" OK
+"from g in class org.hibernate.test.Glarch where g.next is not null" OK
+"from g in class org.hibernate.test.Glarch order by g.order asc" OK
+"from foo in class org.hibernate.test.Foo order by foo.string asc" OK
+"select parent, child from parent in class org.hibernate.test.Foo, child in class org.hibernate.test.Foo where parent.foo = child" OK
+"select count(distinct child.id), count(distinct parent.id) from parent in class org.hibernate.test.Foo, child in class org.hibernate.test.Foo where parent.foo = child" OK
+"select child.id, parent.id, child.long from parent in class org.hibernate.test.Foo, child in class org.hibernate.test.Foo where parent.foo = child" OK
+"select child.id, parent.id, child.long, child, parent.foo from parent in class org.hibernate.test.Foo, child in class org.hibernate.test.Foo where parent.foo = child" OK
+"select parent, child from parent in class org.hibernate.test.Foo, child in class org.hibernate.test.Foo where parent.foo = child and parent.string='a string'" OK
+"from org.hibernate.test.Foo foo where foo.custom.s1 = 'one'" OK
+"from im in class org.hibernate.test.Immutable where im = ?" OK
+"from foo in class org.hibernate.test.Foo where foo.char='X'" OK
+"select distinct elements(baz.stringArray) from baz in class org.hibernate.test.Baz" OK
+"select elements(baz.fooArray) from baz in class org.hibernate.test.Baz" OK
+"from foo in class org.hibernate.test.Fo" OK
+"from foo in class org.hibernate.test.Foo where foo.dependent.qux.foo.string = 'foo2'" OK
+"from org.hibernate.test.Bar bar where bar.object.id = ? and bar.object.class = ?" OK
+"select one from org.hibernate.test.One one, org.hibernate.test.Bar bar where bar.object.id = one.id and bar.object.class = 'O'" OK
+"from l in class org.hibernate.test.Location where l.countryCode = 'AU' and l.description='foo bar'" OK
+"from org.hibernate.test.Bar bar" OK
+"From org.hibernate.test.Bar bar" OK
+"From org.hibernate.test.Foo foo" OK
+"select fum.id from fum in class org.hibernate.test.Fum where not fum.fum='FRIEND'" OK
+"from fum in class org.hibernate.test.Fum where not fum.fum='FRIEND'" OK
+"from fo in class org.hibernate.test.Fo where fo.id.string like 'an instance of fo'" OK
+"from org.hibernate.test.Outer o where o.id.detailId = ?" OK
+"from org.hibernate.test.Outer o where o.id.master.id.sup.dudu is not null" OK
+"from org.hibernate.test.Outer o where o.id.master.id.sup.id.akey is not null" OK
+"select o.id.master.id.sup.dudu from org.hibernate.test.Outer o where o.id.master.id.sup.dudu is not null" OK
+"select o.id.master.id.sup.id.akey from org.hibernate.test.Outer o where o.id.master.id.sup.id.akey is not null" OK
+"from org.hibernate.test.Outer o where o.id.master.bla = ''" OK
+"from org.hibernate.test.Outer o where o.id.master.id.one = ''" OK
+"from org.hibernate.test.Inner inn where inn.id.bkey is not null and inn.backOut.id.master.id.sup.id.akey > 'a'" OK
+"from org.hibernate.test.Outer as o left join o.id.master m left join m.id.sup where o.bubu is not null" OK
+"from org.hibernate.test.Outer as o left join o.id.master.id.sup s where o.bubu is not null" OK
+"from org.hibernate.test.Outer as o left join o.id.master m left join o.id.master.id.sup s where o.bubu is not null" OK
+"select fum1.fo from fum1 in class org.hibernate.test.Fum where fum1.fo.fum is not null" OK
+"from fum1 in class org.hibernate.test.Fum where fum1.fo.fum is not null order by fum1.fo.fum" OK
+"select elements(fum1.friends) from fum1 in class org.hibernate.test.Fum" OK
+"from fum1 in class org.hibernate.test.Fum, fr in elements( fum1.friends )" OK
+"select new Jay(eye) from org.hibernate.test.Eye eye" OK
+"from org.hibernate.test.Category cat where cat.name='new foo'" OK
+"from org.hibernate.test.Category cat where cat.name='new sub'" OK
+"from org.hibernate.test.Up up order by up.id2 asc" OK
+"from org.hibernate.test.Down down" OK
+"from org.hibernate.test.Up up" OK
+"from m in class org.hibernate.test.Master" OK
+"from s in class org.hibernate.test.Several" OK
+"from s in class org.hibernate.test.Single" OK
+"from d in class org.hibernate.test.Detail" OK
+"from c in class org.hibernate.test.Category where c.name = org.hibernate.test.Category.ROOT_CATEGORY" OK
+"select c from c in class org.hibernate.test.Container, s in class org.hibernate.test.Simple where c.oneToMany[2] = s" OK
+"select c from c in class org.hibernate.test.Container, s in class org.hibernate.test.Simple where c.manyToMany[2] = s" OK
+"select c from c in class org.hibernate.test.Container, s in class org.hibernate.test.Simple where s = c.oneToMany[2]" OK
+"select c from c in class org.hibernate.test.Container, s in class org.hibernate.test.Simple where s = c.manyToMany[2]" OK
+"select c from c in class org.hibernate.test.Container where c.oneToMany[0].name = 's'" OK
+"select c from c in class org.hibernate.test.Container where c.manyToMany[0].name = 's'" OK
+"select c from c in class org.hibernate.test.Container where 's' = c.oneToMany[2 - 2].name" OK
+"select c from c in class org.hibernate.test.Container where 's' = c.manyToMany[(3+1)/4-1].name" OK
+"select c from c in class org.hibernate.test.Container where c.manyToMany[ maxindex(c.manyToMany) ].count = 2" OK
+"select c from c in class org.hibernate.test.Container where c.oneToMany[ c.manyToMany[0].count ].name = 's'" OK
+"select c from org.hibernate.test.Container c where c.manyToMany[ c.oneToMany[0].count ].name = 's'" OK
+"select count(comp.name) from org.hibernate.test.Container c join c.components comp" OK
+"from org.hibernate.test.Parent p left join fetch p.child" OK
+"from org.hibernate.test.Parent p join p.child c where c.x > 0" OK
+"from org.hibernate.test.Child c join c.parent p where p.x > 0" OK
+"from org.hibernate.test.Child" OK
+"from org.hibernate.test.MoreStuff" OK
+"from org.hibernate.test.Many" OK
+"from org.hibernate.test.Qux" OK
+"from org.hibernate.test.Fumm" OK
+"from org.hibernate.test.Parent" OK
+"from org.hibernate.test.Simple" OK
+"from org.hibernate.test.Part" OK
+"from org.hibernate.test.Baz" OK
+"from org.hibernate.test.Vetoer" OK
+"from org.hibernate.test.Sortable" OK
+"from org.hibernate.test.Contained" OK
+"from org.hibernate.test.Circular" OK
+"from org.hibernate.test.Stuff" OK
+"from org.hibernate.test.Immutable" OK
+"from org.hibernate.test.Container" OK
+"from org.hibernate.test.One" OK
+"from org.hibernate.test.Fo" OK
+"from org.hibernate.test.Glarch" OK
+"from org.hibernate.test.Fum" OK
+"from org.hibernate.test.Glarch g" OK
+"from org.hibernate.test.Baz baz join baz.parts" OK
+"from c in class org.hibernate.test.Child where c.parent.count=66" OK
+"from org.hibernate.test.Parent p join p.child c where p.count=66" OK
+"select c, c.parent from c in class org.hibernate.test.Child order by c.parent.count" OK
+"select c, c.parent from c in class org.hibernate.test.Child where c.parent.count=66 order by c.parent.count" OK
+"select c, c.parent, c.parent.count from c in class org.hibernate.test.Child order by c.parent.count" OK
+"FROM p IN class org.hibernate.test.Parent WHERE p.count = ?" OK
+"select count(*) from org.hibernate.test.Container as c join c.components as ce join ce.simple as s where ce.name='foo'" OK
+"select c, s from org.hibernate.test.Container as c join c.components as ce join ce.simple as s where ce.name='foo'" OK
+"from s in class org.hibernate.test.Simple" OK
+"from m in class org.hibernate.test.Many" OK
+"from c in class org.hibernate.test.Container" OK
+"from o in class org.hibernate.test.Child" OK
+"from o in class org.hibernate.test.Parent" OK
+"from o in class org.hibernate.test.Circular" OK
+"from c in class org.hibernate.test.C2 where 1=1 or 1=1" OK
+"from b in class org.hibernate.test.B" OK
+"from a in class org.hibernate.test.A" OK
+"from org.hibernate.test.E e join e.reverse as b where b.count=1" OK
+"from org.hibernate.test.E e join e.as as b where b.count=1" OK
+"from org.hibernate.test.B" OK
+"from org.hibernate.test.C1" OK
+"from org.hibernate.test.C2" OK
+"from org.hibernate.test.E e, org.hibernate.test.A a where e.reverse = a.forward and a = ?" OK
+"from org.hibernate.test.E e join fetch e.reverse" OK
+"from org.hibernate.test.E e" OK
+"select max(s.count) from s in class org.hibernate.test.Simple" OK
+"select new org.hibernate.test.S(s.count, s.address) from s in class org.hibernate.test.Simple" OK
+"select count(*) from s in class org.hibernate.test.Simple" OK
+"from s in class org.hibernate.test.Simple where s.name=:name and s.count=:count" OK
+"from s in class org.hibernate.test.Simple where s.name in (:several0_, :several1_)" OK
+"from s in class org.hibernate.test.Simple where s.name in (:stuff0_, :stuff1_)" OK
+"from org.hibernate.test.Simple s where s.name=?" OK
+"from org.hibernate.test.Simple s where s.name=:name" OK
+"from s in class org.hibernate.test.Simple where upper( s.name ) ='SIMPLE 1'" OK
+"from s in class org.hibernate.test.Simple where not( upper( s.name ) ='yada' or 1=2 or 'foo'='bar' or not('foo'='foo') or 'foo' like 'bar' )" OK
+"from s in class org.hibernate.test.Simple where lower( s.name || ' foo' ) ='simple 1 foo'" OK
+"from s in class org.hibernate.test.Simple where upper( s.other.name ) ='SIMPLE 2'" OK
+"from s in class org.hibernate.test.Simple where not ( upper( s.other.name ) ='SIMPLE 2' )" OK
+"select distinct s from s in class org.hibernate.test.Simple where ( ( s.other.count + 3 ) = (15*2)/2 and s.count = 69) or ( ( s.other.count + 2 ) / 7 ) = 2" OK
+"select s from s in class org.hibernate.test.Simple where ( ( s.other.count + 3 ) = (15*2)/2 and s.count = 69) or ( ( s.other.count + 2 ) / 7 ) = 2 order by s.other.count" OK
+"select sum(s.count) from s in class org.hibernate.test.Simple group by s.count having sum(s.count) > 10" OK
+"select s.count from s in class org.hibernate.test.Simple group by s.count having s.count = 12" OK
+"select s.id, s.count, count(t), max(t.date) from s in class org.hibernate.test.Simple, t in class org.hibernate.test.Simple where s.count = t.count group by s.id, s.count order by s.count" OK
+"from s in class org.hibernate.test.Simple where s.name = ?" OK
+"from s in class org.hibernate.test.Simple where s.name = ? and upper(s.name) = ?" OK
+"from s in class org.hibernate.test.Simple where s.name = :foo and upper(s.name) = :bar or s.count=:count or s.count=:count + 1" OK
+"select s.id from s in class org.hibernate.test.Simple" OK
+"select all s, s.other from s in class org.hibernate.test.Simple where s = :s" OK
+"from s in class org.hibernate.test.Simple where s.name in (:name_list0_, :name_list1_) and s.count > :count" OK
+"from org.hibernate.test.Simple s" OK
+"from org.hibernate.test.Assignable" OK
+"from org.hibernate.test.Category" OK
+"from org.hibernate.test.A" OK
+"from foo in class org.hibernate.test.Foo where foo.string=?" OK
+"from foo in class org.hibernate.test.Foo" OK
+"from org.hibernate.test.Po po, org.hibernate.test.Lower low where low.mypo = po" OK
+"from org.hibernate.test.Po po join po.set as sm where sm.amount > 0" OK
+"from org.hibernate.test.Po po join po.top as low where low.foo = 'po'" OK
+"from org.hibernate.test.SubMulti sm join sm.children smc where smc.name > 'a'" OK
+"select s, ya from org.hibernate.test.Lower s join s.yetanother ya" OK
+"from org.hibernate.test.Lower s1 join s1.bag s2" OK
+"from org.hibernate.test.Lower s1 left join s1.bag s2" OK
+"select s, a from org.hibernate.test.Lower s join s.another a" OK
+"select s, a from org.hibernate.test.Lower s left join s.another a" OK
+"from org.hibernate.test.Top s, org.hibernate.test.Lower ls" OK
+"from org.hibernate.test.Lower ls join ls.set s where s.name > 'a'" OK
+"from org.hibernate.test.Po po join po.list sm where sm.name > 'a'" OK
+"from org.hibernate.test.Lower ls inner join ls.another s where s.name is not null" OK
+"from org.hibernate.test.Lower ls where ls.other.another.name is not null" OK
+"from org.hibernate.test.Multi m where m.derived like 'F%'" OK
+"from org.hibernate.test.SubMulti m where m.derived like 'F%'" OK
+"select s from org.hibernate.test.SubMulti as sm join sm.children as s where s.amount>-1 and s.name is null" OK
+"select elements(sm.children) from org.hibernate.test.SubMulti as sm" OK
+"select distinct sm from org.hibernate.test.SubMulti as sm join sm.children as s where s.amount>-1 and s.name is null" OK
+"select distinct s from s in class org.hibernate.test.SubMulti where s.moreChildren[1].amount < 1.0" OK
+"from s in class org.hibernate.test.TrivialClass where s.id = 2" OK
+"select s.count from s in class org.hibernate.test.Top" OK
+"from s in class org.hibernate.test.Lower where s.another.name='name'" OK
+"from s in class org.hibernate.test.Lower where s.yetanother.name='name'" OK
+"from s in class org.hibernate.test.Lower where s.yetanother.name='name' and s.yetanother.foo is null" OK
+"from s in class org.hibernate.test.Top where s.count=1" OK
+"select s.count from s in class org.hibernate.test.Top, ls in class org.hibernate.test.Lower where ls.another=s" OK
+"select elements(ls.bag), elements(ls.set) from ls in class org.hibernate.test.Lower" OK
+"from s in class org.hibernate.test.Lower" OK
+"from s in class org.hibernate.test.Top" OK
+"from sm in class org.hibernate.test.SubMulti" OK
+"select s from s in class org.hibernate.test.Top where s.count>0" OK
+"from m in class org.hibernate.test.Multi where m.count>0 and m.extraProp is not null" OK
+"from m in class org.hibernate.test.Top where m.count>0 and m.name is not null" OK
+"from m in class org.hibernate.test.Lower where m.other is not null" OK
+"from m in class org.hibernate.test.Multi where m.other.id = 1" OK
+"from m in class org.hibernate.test.SubMulti where m.amount > 0.0" OK
+"from m in class org.hibernate.test.Multi" OK
+"from m in class org.hibernate.test.Multi where m.class = SubMulti" OK
+"from m in class org.hibernate.test.Top where m.class = Multi" OK
+"from ls in class org.hibernate.test.Lower" OK
+"from ls in class org.hibernate.test.Lower, s in elements(ls.bag) where s.id is not null" OK
+"from ls in class org.hibernate.test.Lower, s in elements(ls.set) where s.id is not null" OK
+"from o in class org.hibernate.test.Top" OK
+"from o in class org.hibernate.test.Po" OK
+"from ChildMap cm where cm.parent is not null" OK
+"from ParentMap cm where cm.child is not null" OK
+"from org.hibernate.test.Componentizable" OK
+//testUnnamedParameter
+"select foo, bar from org.hibernate.test.Foo foo left outer join foo.foo bar where foo = ?" OK
+//testInElements
+"from bar in class org.hibernate.test.Bar, foo in elements(bar.baz.fooArray)" OK
+"from org.hibernate.test.Bar bar, foo in elements(bar.baz.fooArray)" OK
+//testDotElements
+"select distinct foo from baz in class org.hibernate.test.Baz, foo in elements(baz.fooArray)" OK
+"select foo from baz in class org.hibernate.test.Baz, foo in elements(baz.fooSet)" OK
+"select foo from baz in class org.hibernate.test.Baz, foo in elements(baz.fooArray)" OK
+"from org.hibernate.test.Baz baz where 'b' in elements(baz.collectionComponent.nested.foos) and 1.0 in elements(baz.collectionComponent.nested.floats)" OK
+//testNot
+"from eg.Cat cat where not ( cat.kittens.size < 1 )" OK
+"from eg.Cat cat where not ( cat.kittens.size > 1 )" OK
+"from eg.Cat cat where not ( cat.kittens.size >= 1 )" OK
+"from eg.Cat cat where not ( cat.kittens.size <= 1 )" OK
+"from eg.DomesticCat cat where not ( cat.name between 'A' and 'B' )" OK
+"from eg.DomesticCat cat where not ( cat.name not between 'A' and 'B' )" OK
+"from eg.Cat cat where not ( not cat.kittens.size <= 1 )" OK
+"from eg.Cat cat where not not ( not cat.kittens.size <= 1 )" OK
+//testOtherSyntax
+"select bar from org.hibernate.test.Bar bar order by ((bar.x - :valueX)*(bar.x - :valueX))" OK
+"from bar in class org.hibernate.test.Bar, foo in elements(bar.baz.fooSet)" OK
+"from one in class org.hibernate.test.One, many in elements(one.manies) where one.id = 1 and many.id = 1" OK
+"from org.hibernate.test.Inner _inner join _inner.middles middle" OK
+"FROM m IN class org.hibernate.test.Master WHERE NOT EXISTS ( FROM d IN elements(m.details) WHERE NOT d.i=5 )" OK
+"FROM m IN class org.hibernate.test.Master WHERE NOT 5 IN ( SELECT d.i FROM d IN elements(m.details) )" OK
+"SELECT m FROM m IN class org.hibernate.test.Master, d IN elements(m.details) WHERE d.i=5" OK
+"SELECT m.id FROM m IN class org.hibernate.test.Master, d IN elements(m.details) WHERE d.i=5" OK
+//I'm not sure about these... [jsd]
+//"select bar.string, foo.string from bar in class org.hibernate.test.Bar inner join bar.baz as baz inner join elements(baz.fooSet) as foo where baz.name = 'name'" OK
+//"select bar.string, foo.string from bar in class org.hibernate.test.Bar, bar.baz as baz, elements(baz.fooSet) as foo where baz.name = 'name'" OK
+//"select count(*) where this.amount>-1 and this.name is null" OK
+//"from sm in class org.hibernate.test.SubMulti where exists sm.children.elements" OK
+//testEjbqlExtensions
+"select object(a) from Animal a where a.mother member of a.offspring" OK
+"select object(a) from Animal a where a.offspring is empty" OK
+//testHB1042
+"select x from fmc_web.pool.Pool x left join x.containers c0 where (upper(x.name) = upper(':') and c0.id = 1)" OK
+//testKeywordInPath
+"from Customer c where c.order.status = 'argh'" OK
+"from Customer c where c.order.count > 3" OK
+"select c.where from Customer c where c.order.count > 3" OK
+"from Interval i where i.end <:end" OK
+"from Letter l where l.case = :case" OK
+//testPathologicalKeywordAsIdentifier
+"from Order order" OK
+"from Order order join order.group" OK
+"from X x order by x.group.by.from" OK
+"from Order x order by x.order.group.by.from" OK
+"select order.id from Order order" OK
+"select order from Order order" OK
+"from Order order where order.group.by.from is not null" OK
+"from Order order order by order.group.by.from" OK
+"from Group as group group by group.by.from" OK
+//testHHH354
+"from Foo f where f.full = 'yep'" OK
+//testWhereAsIdentifier
+"from where.Order" OK
+//testConstructorIn
+"from org.hibernate.test.Bar bar where (b.x, b.y, b.z) in (select foo, bar, baz from org.hibernate.test.Foo)" OK
+//testMultiByteCharacters
+"from User user where user.name like '%nn\u4e2dnn%'" OK
+//FIXME "from User user where user.\u432d like '%\u4e2d%'" OK
+//FIXME "from \u432d \u432d where \u432d.name like '%fred%'" OK
+//testHHH719
+"from Foo f order by com.fooco.SpecialFunction(f.id)" OK
+//testHHH1107
+"from Animal where zoo.address.street = '123 Bogus St.'" OK
+//testHHH1247
+"select distinct user.party from com.itf.iceclaims.domain.party.user.UserImpl user inner join user.party.$RelatedWorkgroups relatedWorkgroups where relatedWorkgroups.workgroup.id = :workgroup and relatedWorkgroups.effectiveTime.start <= :datesnow and relatedWorkgroups.effectiveTime.end > :dateenow " OK
+//testLineAndColumnNumber
+"from Foo f where f.name = 'fred'" OK
+//
+"from Animal a where a.bodyWeight = ?1" OK
+"select object(m) from Model m" OK
+"select o from Animal a inner join a.offspring o" OK
+"select object(o) from Animal a, in(a.offspring) o" OK
+"from Animal a where not exists elements(a.offspring)" OK
+"from Animal a where exists (from a.mother.father.offspring)" OK
+"select object(a) from Animal a where a.mother.father.offspring is not empty" OK
+"from Animal a where a.mother in (from a.offspring)" OK
+"from Animal a where a.mother not in (from a.offspring)" OK
+"select object(a) from Animal a where a.mother not member of a.offspring" OK
+"select object(a) from Animal a where a.description = concat('1', concat('2','3'), '4'||'5')||0" OK
+"from Animal a where substring(a.description, 1, 3) = :p1" OK
+"select substring(a.description, 1, 3) from Animal a" OK
+"from Animal a where lower(a.description) = :p1" OK
+"from Animal a where upper(a.description) = :p1" OK
+"from Animal a where length(a.description) = :p1" OK
+"select length(a.description) from Animal a" OK
+"from Animal a where locate(a.description, 'abc', 2) = :p1" OK
+"select locate(a.description, :p1, 2) from Animal a" OK
+"select object(a) from Animal a where trim(trailing '_' from a.description) = :p1" OK
+"select trim(trailing '_' from a.description) from Animal a" OK
+"select object(a) from Animal a where trim(leading '_' from a.description) = :p1" OK
+"select object(a) from Animal a where trim(both a.description) = :p1" FAIL
+"select object(a) from Animal a where trim(a.description) = :p1" OK
+"select object(a) from Animal a where abs(a.bodyWeight) = sqrt(a.bodyWeight)" OK
+"select object(a) from Animal a where mod(a.bodyWeight, a.mother.bodyWeight) = :p1" OK
+"select object(a) from Animal a where BIT_LENGTH(a.bodyWeight) = :p1" OK
+"select BIT_LENGTH(a.bodyWeight) from Animal a" OK
+"select object(a) from Animal a where CURRENT_DATE = :p1 or CURRENT_TIME = :p2 or CURRENT_TIMESTAMP = :p3" OK
+"select object(a) from Animal a where a.bodyWeight like '%a%'" OK
+"select object(a) from Animal a where a.bodyWeight not like '%a%'" OK
+"select object(a) from Animal a where a.bodyWeight like '%a%' escape '%'" OK
+"from Human h where h.pregnant is true" FAIL
+"from Human h where h.pregnant = true" OK
+"from Human h where h.pregnant is false" FAIL
+"from Human h where h.pregnant = false" OK
+"from Human h where not(h.pregnant is true)" FAIL
+"from Human h where not( h.pregnant=true )" OK
+"select CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP from Animal a" OK
+"select p.name, a.zipCode, count(*) from Person p left outer join Employee e on e.id = p.id and p.type = 'E' and (e.effective>? or e.effective<?) join Address a on a.pid = p.id where upper(p.name) like 'G%' and p.age > 100 and (p.sex = 'M' or p.sex = 'F') and coalesce( trim(a.street), a.city, (a.zip) ) is not null order by p.name asc, a.zipCode asc" OK
+"select ( (m.age - p.age) * 12 ), trim(upper(p.name)) from Person p, Person m where p.mother = m.id and ( p.age = (select max(p0.age) from Person p0 where (p0.mother=m.id)) and p.name like ? )" OK
+"select * from Address a join Person p on a.pid = p.id, Person m join Address b on b.pid = m.id where p.mother = m.id and p.name like ?" FAIL
+"select case when p.age > 50 then 'old' when p.age > 18 then 'adult' else 'child' end from Person p where ( case when p.age > 50 then 'old' when p.age > 18 then 'adult' else 'child' end ) like ?" OK
+//HQLTest.testInvalidCollectionDereferencesFail
+"from Animal a where a.offspring.description = 'xyz'" OK
+"from Animal a where a.offspring.father.description = 'xyz'" OK
+//HQLTest.testSubComponentReferences
+"select c.address.zip.code from ComponentContainer c" OK
+"select c.address.zip from ComponentContainer c" OK
+"select c.address from ComponentContainer c" OK
+//HQLTest.testManyToAnyReferences
+"from PropertySet p where p.someSpecificProperty.id is not null" OK
+"from PropertySet p join p.generalProperties gp where gp.id is not null" OK
+//HQLTest.testCollectionJoinsInSubselect
+"select a.id, a.description from Animal a left join a.offspring where a in ( select a1 from Animal a1 left join a1.offspring o where a1.id=1)" OK
+"select h.id, h.description from Human h left join h.friends where h in ( select h1 from Human h1 left join h1.friends f where h1.id=1 )" OK
+//HQLTest.testEmptyInListFailureExpected
+"select a from Animal a where a.description in ()" FAIL
+"select o.orderDate - o.orderDate from Order o" OK
+//HQLTest.testDateTimeArithmeticReturnTypesAndParameterGuessing
+"select o.orderDate + 2 from Order o" OK
+"select o.orderDate -2 from Order o" OK
+"from Order o where o.orderDate > ?" OK
+"select o.orderDate + ? from Order o" OK
+//HQLTest.testReturnMetadata
+"select a as animal from Animal a" OK
+"select o as entity from java.lang.Object o" OK
+//HQLTest.testImplicitJoinsAlongWithCartesianProduct
+"select foo.foo from Foo foo, Foo foo2" OK
+"select foo.foo.foo from Foo foo, Foo foo2" OK
+//HQLTest.testSubselectBetween
+"from Animal x where (select max(a.bodyWeight) from Animal a) between :min and :max" OK
+"from Animal x where (select max(a.description) from Animal a) like 'big%'" OK
+"from Animal x where (select max(a.bodyWeight) from Animal a) is not null" OK
+"from Animal x where exists (select max(a.bodyWeight) from Animal a)" OK
+"from Animal x where (select max(a.bodyWeight) from Animal a) in (1,2,3)" OK
+//HQLTest.testFetchOrderBy
+"from Animal a left outer join fetch a.offspring where a.mother.id = :mid order by a.description" OK
+//HQLTest.testCollectionOrderBy
+"from Animal a join a.offspring o order by a.description" OK
+"from Animal a join fetch a.offspring order by a.description" OK
+"from Animal a join fetch a.offspring o order by o.description" OK
+"from Animal a join a.offspring o order by a.description, o.description" OK
+//HQLTest.testExpressionWithParamInFunction
+"from Animal a where abs(a.bodyWeight-:param) < 2.0" OK
+"from Animal a where abs(:param - a.bodyWeight) < 2.0" OK
+//HQLTest.testCompositeKeysWithPropertyNamedId
+"select e.id.id from EntityWithCrazyCompositeKey e" OK
+"select max(e.id.id) from EntityWithCrazyCompositeKey e" OK
+//HQLTest.testMaxindexHqlFunctionInElementAccessorFailureExpected
+"select c from ContainerX c where c.manyToMany[ maxindex(c.manyToMany) ].count = 2" OK
+"select c from Container c where c.manyToMany[ maxIndex(c.manyToMany) ].count = 2" OK
+//HQLTest.testMultipleElementAccessorOperatorsFailureExpected
+"select c from ContainerX c where c.oneToMany[ c.manyToMany[0].count ].name = 's'" OK
+//HQLTest.testKeyManyToOneJoinFailureExpected
+"from Order o left join fetch o.lineItems li left join fetch li.product p" OK
+"from Outer o where o.id.master.id.sup.dudu is not null" OK
+//HQLTest.testDuplicateExplicitJoinFailureExpected
+"from Animal a join a.mother m1 join a.mother m2" OK
+"from Zoo zoo join zoo.animals an join zoo.mammals m" OK
+"from Zoo zoo join zoo.mammals an join zoo.mammals m" OK
+//HQLTest.testIndexWithExplicitJoin
+"from Zoo zoo join zoo.animals an where zoo.mammals[ index(an) ] = an" OK
+"from Zoo zoo join zoo.mammals dog where zoo.mammals[ index(dog) ] = dog" OK
+"from Zoo zoo join zoo.mammals dog where dog = zoo.mammals[ index(dog) ]" OK
+//HQLTest.testOneToManyMapIndex
+"from Zoo zoo where zoo.mammals['dog'].description like '%black%'" OK
+"from Zoo zoo where zoo.mammals['dog'].father.description like '%black%'" OK
+"from Zoo zoo where zoo.mammals['dog'].father.id = 1234" OK
+"from Zoo zoo where zoo.animals['1234'].description like '%black%'" OK
+//HQLTest.testExplicitJoinMapIndex
+"from Zoo zoo, Dog dog where zoo.mammals['dog'] = dog" OK
+"from Zoo zoo join zoo.mammals dog where zoo.mammals['dog'] = dog" OK
+//HQLTest.testIndexFunction
+"from Zoo zoo join zoo.mammals dog where index(dog) = 'dog'" OK
+"from Zoo zoo join zoo.animals an where index(an) = '1234'" OK
+//HQLTest.testSelectCollectionOfValues
+"select baz, date from Baz baz join baz.stringDateMap date where index(date) = 'foo'" OK
+//HQLTest.testCollectionOfValues
+"from Baz baz join baz.stringDateMap date where index(date) = 'foo'" OK
+//HQLTest.testHHH719
+"from Baz b order by org.bazco.SpecialFunction(b.id)" OK
+"from Baz b order by anypackage.anyFunction(b.id)" OK
+//HQLTest.testParameterListExpansion
+"from Animal as animal where animal.id in (:idList_1, :idList_2)" OK
+//HQLTest.testComponentManyToOneDereferenceShortcut
+"from Zoo z where z.address.stateProvince.id is null" OK
+//HQLTest.testNestedCollectionImplicitJoins
+"select h.friends.offspring from Human h" OK
+//HQLTest.testExplicitJoinsInSubquery
+"from org.hibernate.test.hql.Animal as animal where animal.id in ( select a.id from org.hibernate.test.hql.Animal as a left join a.mother as mo )" OK
+//HQLTest.testImplicitJoinsInGroupBy
+"select o.mother.bodyWeight, count(distinct o) from Animal an join an.offspring as o group by o.mother.bodyWeight" OK
+//HQLTest.testCrazyIdFieldNames
+"select e.heresAnotherCrazyIdFieldName from MoreCrazyIdFieldNameStuffEntity e where e.heresAnotherCrazyIdFieldName is not null" OK
+"select e.heresAnotherCrazyIdFieldName.heresAnotherCrazyIdFieldName from MoreCrazyIdFieldNameStuffEntity e where e.heresAnotherCrazyIdFieldName is not null" OK
+//HQLTest.testSizeFunctionAndProperty
+"from Animal a where a.offspring.size > 0" OK
+"from Animal a join a.offspring where a.offspring.size > 1" OK
+"from Animal a where size(a.offspring) > 0" OK
+"from Animal a join a.offspring o where size(a.offspring) > 1" OK
+"from Animal a where size(a.offspring) > 1 and size(a.offspring) < 100" OK
+"from Human a where a.family.size > 0" OK
+"from Human a join a.family where a.family.size > 1" OK
+"from Human a where size(a.family) > 0" OK
+"from Human a join a.family o where size(a.family) > 1" OK
+"from Human a where a.family.size > 0 and a.family.size < 100" OK
+//HQLTest.testFromOnly
+"from Animal" OK
+"from Model" OK
+//HQLTest.testJoinPathEndingInValueCollection
+"select h from Human as h join h.nickNames as nn where h.nickName=:nn1 and (nn=:nn2 or nn=:nn3)" OK
+//HQLTest.testSerialJoinPathEndingInValueCollection
+"select h from Human as h join h.friends as f join f.nickNames as nn where h.nickName=:nn1 and (nn=:nn2 or nn=:nn3)" OK
+//HQLTest.testImplicitJoinContainedByCollectionFunction
+"from Human as h where 'shipping' in indices(h.father.addresses)" OK
+"from Human as h where 'shipping' in indices(h.father.father.addresses)" OK
+"from Human as h where 'sparky' in elements(h.father.nickNames)" OK
+"from Human as h where 'sparky' in elements(h.father.father.nickNames)" OK
+//HQLTest.testImpliedJoinInSubselectFrom
+"from Animal a where exists( from a.mother.offspring )" OK
+//HQLTest.testSubselectImplicitJoins
+"from Simple s where s = some( select sim from Simple sim where sim.other.count=s.other.count )" OK
+//HQLTest.testCollectionOfValuesSize
+"select size(baz.stringDateMap) from org.hibernate.test.legacy.Baz baz" OK
+//HQLTest.testCollectionFunctions
+"from Zoo zoo where size(zoo.animals) > 100" OK
+"from Zoo zoo where maxindex(zoo.mammals) = 'dog'" OK
+//HQLTest.testImplicitJoinInExplicitJoin
+"from Animal an inner join an.mother.mother gm" OK
+"from Animal an inner join an.mother.mother.mother ggm" OK
+"from Animal an inner join an.mother.mother.mother.mother gggm" OK
+//HQLTest.testImpliedManyToManyProperty
+"select c from ContainerX c where c.manyToMany[0].name = 's'" OK
+"select size(zoo.animals) from Zoo zoo" OK
+//HQLTest.testCollectionIndexFunctionsInSelect" OK
+"select maxindex(zoo.animals) from Zoo zoo" OK
+"select minindex(zoo.animals) from Zoo zoo" OK
+"select indices(zoo.animals) from Zoo zoo" OK
+//HQLTest.testCollectionElementFunctionsInSelect
+"select maxelement(zoo.animals) from Zoo zoo" OK
+"select minelement(zoo.animals) from Zoo zoo" OK
+"select elements(zoo.animals) from Zoo zoo" OK
+//HQLTest.testFetchCollectionOfValues
+"from Baz baz left join fetch baz.stringSet" OK
+//HQLTest.testFetchList
+"from User u join fetch u.permissions" OK
+//HQLTest.testCollectionFetchWithExplicitThetaJoin
+"select m from Master m1, Master m left join fetch m.details where m.name=m1.name" OK
+//HQLTest.testListElementFunctionInSelect
+"select maxelement(u.permissions) from User u" OK
+"select elements(u.permissions) from User u" OK
+//HQLTest.testListElementFunctionInWhere
+"from User u where 'read' in elements(u.permissions)" OK
+"from User u where 'write' <> all elements(u.permissions)" OK
+//HQLTest.testManyToManyElementFunctionInSelect
+"select maxelement(human.friends) from Human human" OK
+"select elements(human.friends) from Human human" OK
+//HQLTest.testManyToManyMaxElementFunctionInWhere
+"from Human human where 5 = maxelement(human.friends)" OK
+//HQLTest.testCollectionIndexFunctionsInWhere
+"from Zoo zoo where 4 = maxindex(zoo.animals)" OK
+"from Zoo zoo where 2 = minindex(zoo.animals)" OK
+//HQLTest.testCollectionIndicesInWhere
+"from Zoo zoo where 4 > some indices(zoo.animals)" OK
+"from Zoo zoo where 4 > all indices(zoo.animals)" OK
+//HQLTest.testIndicesInWhere
+"from Zoo zoo where 4 in indices(zoo.animals)" OK
+"from Zoo zoo where exists indices(zoo.animals)" OK
+//HQLTest.testCollectionElementInWhere
+"from Zoo zoo where 4 > some elements(zoo.animals)" OK
+"from Zoo zoo where 4 > all elements(zoo.animals)" OK
+//HQLTest.testElementsInWhere
+"from Zoo zoo where 4 in elements(zoo.animals)" OK
+"from Zoo zoo where exists elements(zoo.animals)" OK
+//HQLTest.testNull
+"from Human h where h.nickName is null" OK
+"from Human h where h.nickName is not null" OK
+//HQLTest.testSubstitutions
+"from Human h where h.pregnant = yes" OK
+"from Human h where h.pregnant = foo" OK
+//HQLTest.testEscapedQuote
+"from Human h where h.nickName='1 ov''tha''few'" OK
+//HQLTest.testCaseWhenElse
+"from Human h where case when h.nickName='1ovthafew' then 'Gavin' when h.nickName='turin' then 'Christian' else h.nickName end = h.name.first" OK
+//HQLTest.testCaseExprWhenElse
+"from Human h where case h.nickName when '1ovthafew' then 'Gavin' when 'turin' then 'Christian' else h.nickName end = h.name.first" OK
+//HQLTest.testInvalidHql
+"from Animal foo where an.bodyWeight > 10" OK
+"select an.name from Animal foo" OK
+"from Animal foo where an.verybogus > 10" OK
+"select an.boguspropertyname from Animal foo" OK
+"select an.name" FAIL
+"from Animal an where (((an.bodyWeight > 10 and an.bodyWeight < 100)) or an.bodyWeight is null" FAIL
+"from Animal an where an.bodyWeight is null where an.bodyWeight is null" FAIL
+"from where name='foo'" FAIL
+"from NonexistentClass where name='foo'" OK
+"select new FOO_BOGUS_Animal(an.description, an.bodyWeight) from Animal an" OK
+"select new Animal(an.description, an.bodyWeight, 666) from Animal an" OK
+//HQLTest.testWhereBetween
+"from Animal an where an.bodyWeight between 1 and 10" OK
+//HQLTest.testConcatenation
+"from Human h where h.nickName = '1' || 'ov' || 'tha' || 'few'" OK
+//HQLTest.testWhereLike
+"from Animal a where a.description like '%black%'" OK
+"from Animal an where an.description like '%fat%'" OK
+"from Animal an where lower(an.description) like '%fat%'" OK
+//HQLTest.testWhereIn
+"from Animal an where an.description in ('fat', 'skinny')" OK
+//HQLTest.testLiteralInFunction
+"from Animal an where an.bodyWeight > abs(5)" OK
+"from Animal an where an.bodyWeight > abs(-5)" OK
+//HQLTest.testExpressionInFunction
+"from Animal an where an.bodyWeight > abs(3-5)" OK
+"from Animal an where an.bodyWeight > abs(3/5)" OK
+"from Animal an where an.bodyWeight > abs(3+5)" OK
+"from Animal an where an.bodyWeight > abs(3*5)" OK
+//HQLTest.testNotOrWhereClause
+"from Simple s where 'foo'='bar' or not 'foo'='foo'" OK
+"from Simple s where 'foo'='bar' or not ('foo'='foo')" OK
+"from Simple s where not ( 'foo'='bar' or 'foo'='foo' )" OK
+"from Simple s where not ( 'foo'='bar' and 'foo'='foo' )" OK
+"from Simple s where not ( 'foo'='bar' and 'foo'='foo' ) or not ('x'='y')" OK
+"from Simple s where not ( 'foo'='bar' or 'foo'='foo' ) and not ('x'='y')" OK
+"from Simple s where not ( 'foo'='bar' or 'foo'='foo' ) and 'x'='y'" OK
+"from Simple s where not ( 'foo'='bar' and 'foo'='foo' ) or 'x'='y'" OK
+"from Simple s where 'foo'='bar' and 'foo'='foo' or not 'x'='y'" OK
+"from Simple s where 'foo'='bar' or 'foo'='foo' and not 'x'='y'" OK
+"from Simple s where ('foo'='bar' and 'foo'='foo') or 'x'='y'" OK
+"from Simple s where ('foo'='bar' or 'foo'='foo') and 'x'='y'" OK
+"from Simple s where not( upper( s.name ) ='yada' or 1=2 or 'foo'='bar' or not('foo'='foo') or 'foo' like 'bar' )" OK
+//HQLTest.testComplexExpressionInFunction
+"from Animal an where an.bodyWeight > abs((3-5)/4)" OK
+//HQLTest.testStandardFunctions
+"from Animal where current_date = current_time" OK
+"from Animal a where upper(a.description) = 'FAT'" OK
+"select lower(a.description) from Animal a" OK
+//HQLTest.testOrderBy
+"from Animal an order by an.bodyWeight" OK
+"from Animal an order by an.bodyWeight asc" OK
+"from Animal an order by an.bodyWeight desc" OK
+"from Animal an order by sqrt(an.bodyWeight*4)/2" OK
+"from Animal an order by an.mother.bodyWeight" OK
+"from Animal an order by an.bodyWeight, an.description" OK
+"from Animal an order by an.bodyWeight asc, an.description desc" OK
+"from Human h order by sqrt(h.bodyWeight), year(h.birthdate)" OK
+//HQLTest.testGroupByFunction
+"select count(*) from Human h group by year(h.birthdate)" OK
+"select count(*) from Human h group by trunc( sqrt(h.bodyWeight*4)/2 )" OK
+"select count(*) from Human h group by year(sysdate)" OK
+//HQLTest.testPolymorphism
+"from Mammal" OK
+"from Dog" OK
+"from Mammal m where m.pregnant = false and m.bodyWeight > 10" OK
+"from Dog d where d.pregnant = false and d.bodyWeight > 10" OK
+//HQLTest.testProduct
+"from Animal, Animal" OK
+"from Animal x, Animal y where x.bodyWeight = y.bodyWeight" OK
+"from Animal x, Mammal y where x.bodyWeight = y.bodyWeight and not y.pregnant = true" OK
+"from Mammal, Mammal" OK
+//HQLTest.testJoinedSubclassProduct
+"from PettingZoo, PettingZoo" OK
+//HQLTest.testProjectProduct
+"select x from Human x, Human y where x.nickName = y.nickName" OK
+"select x, y from Human x, Human y where x.nickName = y.nickName" OK
+//HQLTest.testExplicitEntityJoins
+"from Animal an inner join an.mother mo" OK
+"from Animal an left outer join an.mother mo" OK
+"from Animal an left outer join fetch an.mother" OK
+//HQLTest.testMultipleExplicitEntityJoins
+"from Animal an inner join an.mother mo inner join mo.mother gm" OK
+"from Animal an left outer join an.mother mo left outer join mo.mother gm" OK
+"from Animal an inner join an.mother m inner join an.father f" OK
+"from Animal an left join fetch an.mother m left join fetch an.father f" OK
+//HQLTest.testMultipleExplicitJoins
+"from Animal an inner join an.mother mo inner join an.offspring os" OK
+"from Animal an left outer join an.mother mo left outer join an.offspring os" OK
+//HQLTest.testExplicitEntityJoinsWithRestriction
+"from Animal an inner join an.mother mo where an.bodyWeight < mo.bodyWeight" OK
+//HQLTest.testIdProperty
+"from Animal a where a.mother.id = 12" OK
+//HQLTest.testSubclassAssociation
+"from DomesticAnimal da join da.owner o where o.nickName = 'Gavin'" OK
+"from DomesticAnimal da left join fetch da.owner" OK
+"from Human h join h.pets p where p.pregnant = 1" OK
+"from Human h join h.pets p where p.bodyWeight > 100" OK
+"from Human h left join fetch h.pets" OK
+//HQLTest.testExplicitCollectionJoins
+"from Animal an inner join an.offspring os" OK
+"from Animal an left outer join an.offspring os" OK
+//HQLTest.testExplicitOuterJoinFetch
+"from Animal an left outer join fetch an.offspring" OK
+//HQLTest.testExplicitOuterJoinFetchWithSelect
+"select an from Animal an left outer join fetch an.offspring" OK
+//HQLTest.testExplicitJoins
+"from Zoo zoo join zoo.mammals mam where mam.pregnant = true and mam.description like '%white%'" OK
+"from Zoo zoo join zoo.animals an where an.description like '%white%'" OK
+//HQLTest.testMultibyteCharacterConstant
+"from Zoo zoo join zoo.animals an where an.description like '%\u4e2d%'" OK
+//HQLTest.testImplicitJoins
+"from Animal an where an.mother.bodyWeight > ?" OK
+"from Animal an where an.mother.bodyWeight > 10" OK
+"from Dog dog where dog.mother.bodyWeight > 10" OK
+"from Animal an where an.mother.mother.bodyWeight > 10" OK
+"from Animal an where an.mother is not null" OK
+"from Animal an where an.mother.id = 123" OK
+//HQLTest.testImplicitJoinInSelect
+"select foo, foo.long from Foo foo" OK
+"select foo.foo from Foo foo" OK
+"select foo, foo.foo from Foo foo" OK
+"select foo.foo from Foo foo where foo.foo is not null" OK
+//HQLTest.testSelectExpressions
+"select an.mother.mother from Animal an" OK
+"select an.mother.mother.mother from Animal an" OK
+"select an.mother.mother.bodyWeight from Animal an" OK
+"select an.mother.zoo.id from Animal an" OK
+"select user.human.zoo.id from User user" OK
+"select u.userName, u.human.name.first from User u" OK
+"select u.human.name.last, u.human.name.first from User u" OK
+"select bar.baz.name from Bar bar" OK
+"select bar.baz.name, bar.baz.count from Bar bar" OK
+//HQLTest.testSelectStandardFunctionsNoParens
+"select current_date, current_time, current_timestamp from Animal" OK
+//HQLTest.testMapIndex
+"from User u where u.permissions['hibernate']='read'" OK
+//HQLTest.testCollectionFunctionsInSelect
+"select baz, size(baz.stringSet), count( distinct elements(baz.stringSet) ), max( elements(baz.stringSet) ) from Baz baz group by baz" OK
+"select elements(fum1.friends) from org.hibernate.test.legacy.Fum fum1" OK
+"select elements(one.manies) from org.hibernate.test.legacy.One one" OK
+//HQLTest.testNamedParameters
+"from Animal an where an.mother.bodyWeight > :weight" OK
+//HQLTest.testClassProperty
+"from Animal a where a.mother.class = Reptile" OK
+//HQLTest.testComponent
+"from Human h where h.name.first = 'Gavin'" OK
+//HQLTest.testSelectEntity
+"select an from Animal an inner join an.mother mo where an.bodyWeight < mo.bodyWeight" OK
+"select mo, an from Animal an inner join an.mother mo where an.bodyWeight < mo.bodyWeight" OK
+//HQLTest.testValueAggregate
+"select max(p), min(p) from User u join u.permissions p" OK
+//HQLTest.testAggregation
+"select count(an) from Animal an" OK
+"select count(distinct an) from Animal an" OK
+"select count(distinct an.id) from Animal an" OK
+"select count(all an.id) from Animal an" OK
+//HQLTest.testSelectProperty
+"select an.bodyWeight, mo.bodyWeight from Animal an inner join an.mother mo where an.bodyWeight < mo.bodyWeight" OK
+//HQLTest.testSelectEntityProperty
+"select an.mother from Animal an" OK
+"select an, an.mother from Animal an" OK
+//HQLTest.testSelectDistinctAll
+"select distinct an.description, an.bodyWeight from Animal an" OK
+"select all an from Animal an" OK
+//HQLTest.testSelectAssociatedEntityId
+"select an.mother.id from Animal an" OK
+//HQLTest.testGroupBy
+"select an.mother.id, max(an.bodyWeight) from Animal an group by an.mother.id having max(an.bodyWeight)>1.0" OK
+//HQLTest.testGroupByMultiple
+"select s.id, s.count, count(t), max(t.date) from org.hibernate.test.legacy.Simple s, org.hibernate.test.legacy.Simple t where s.count = t.count group by s.id, s.count order by s.count" OK
+//HQLTest.testManyToMany
+"from Human h join h.friends f where f.nickName = 'Gavin'" OK
+"from Human h join h.friends f where f.bodyWeight > 100" OK
+//HQLTest.testManyToManyElementFunctionInWhere
+"from Human human where human in elements(human.friends)" OK
+"from Human human where human = some elements(human.friends)" OK
+//HQLTest.testManyToManyElementFunctionInWhere2
+"from Human h1, Human h2 where h2 in elements(h1.family)" OK
+"from Human h1, Human h2 where 'father' in indices(h1.family)" OK
+//HQLTest.testManyToManyFetch
+"from Human h left join fetch h.friends" OK
+//HQLTest.testManyToManyIndexAccessor
+"select c from ContainerX c, Simple s where c.manyToMany[2] = s" OK
+"select s from ContainerX c, Simple s where c.manyToMany[2] = s" OK
+"from ContainerX c, Simple s where c.manyToMany[2] = s" OK
+//HQLTest.testSelectNew
+"select new Animal(an.description, an.bodyWeight) from Animal an" OK
+"select new org.hibernate.test.hql.Animal(an.description, an.bodyWeight) from Animal an" OK
+//HQLTest.testSimpleCorrelatedSubselect
+"from Animal a where a.bodyWeight = (select o.bodyWeight from a.offspring o)" OK
+"from Animal a where a = (from a.offspring o)" OK
+//HQLTest.testSimpleUncorrelatedSubselect
+"from Animal a where a.bodyWeight = (select an.bodyWeight from Animal an)" OK
+"from Animal a where a = (from Animal an)" OK
+//HQLTest.testSimpleCorrelatedSubselect2
+"from Animal a where a = (select o from a.offspring o)" OK
+"from Animal a where a in (select o from a.offspring o)" OK
+//HQLTest.testSimpleUncorrelatedSubselect2
+"from Animal a where a = (select an from Animal an)" OK
+"from Animal a where a in (select an from Animal an)" OK
+//HQLTest.testUncorrelatedSubselect2
+"from Animal a where a.bodyWeight = (select max(an.bodyWeight) from Animal an)" OK
+//HQLTest.testCorrelatedSubselect2
+"from Animal a where a.bodyWeight > (select max(o.bodyWeight) from a.offspring o)" OK
+//HQLTest.testManyToManyJoinInSubselect
+"select foo from Foo foo where foo in (select elt from Baz baz join baz.fooArray elt)" OK
+//HQLTest.testImplicitJoinInSubselect
+"from Animal a where a = (select an.mother from Animal an)" OK
+"from Animal a where a.id = (select an.mother.id from Animal an)" OK
+//HQLTest.testManyToOneSubselect
+"from Animal a where 'foo' in (select m.description from a.mother m)" OK
+//HQLTest.testPositionalParameters
+"from Animal an where an.bodyWeight > ?" OK
+//HQLTest.testKeywordPropertyName
+"from Glarch g order by g.order asc" OK
+"select g.order from Glarch g where g.order = 3" OK
+//HQLTest.testJavaConstant
+"from org.hibernate.test.legacy.Category c where c.name = org.hibernate.test.legacy.Category.ROOT_CATEGORY" OK
+"from org.hibernate.test.legacy.Category c where c.id = org.hibernate.test.legacy.Category.ROOT_ID" OK
+"from Category c where c.name = Category.ROOT_CATEGORY" OK
+"select c.name, Category.ROOT_ID from Category as c" OK
+//HQLTest.testClassName
+"from Zoo zoo where zoo.class = PettingZoo" OK
+"from DomesticAnimal an where an.class = Dog" OK
+//HQLTest.testSelectDialectFunction
+"select mod(s.count, 2) from org.hibernate.test.legacy.Simple as s where s.id = 10" OK
+"select upper(human.name.first) from Human human" OK
+"from Human human where lower(human.name.first) like 'gav%'" OK
+"select max(a.bodyWeight) from Animal a" OK
+//HQLTest.testTwoJoins
+"from Human human join human.friends, Human h join h.mother" OK
+"from Human human join human.friends f, Animal an join an.mother m where f=m" OK
+"from Baz baz left join baz.fooToGlarch, Bar bar join bar.foo" OK
+//HQLTest.testToOneToManyManyJoinSequence
+"from Dog d join d.owner h join h.friends f where f.name.first like 'joe%'" OK
+//HQLTest.testToOneToManyJoinSequence
+"from Animal a join a.mother m join m.offspring" OK
+"from Dog d join d.owner m join m.offspring" OK
+"from Animal a join a.mother m join m.offspring o where o.bodyWeight > a.bodyWeight" OK
+//HQLTest.testSubclassExplicitJoin
+"from DomesticAnimal da join da.owner o where o.nickName = 'gavin'" OK
+"from DomesticAnimal da join da.owner o where o.bodyWeight > 0" OK
+//HQLTest.testMultipleExplicitCollectionJoins
+"from Animal an inner join an.offspring os join os.offspring gc" OK
+"from Animal an left outer join an.offspring os left outer join os.offspring gc" OK
+//HQLTest.testSelectDistinctComposite
+"select distinct p from org.hibernate.test.compositeelement.Parent p join p.children c where c.name like 'Child%'" OK
+//HQLTest.testDotComponent
+"select fum.id from org.hibernate.test.legacy.Fum as fum where not fum.fum='FRIEND'" OK
+//HQLTest.testOrderByCount
+"from Animal an group by an.zoo.id order by an.zoo.id, count(*)" OK
+//HQLTest.testHavingCount
+"from Animal an group by an.zoo.id having count(an.zoo.id) > 1" OK
+//HQLTest.selectWhereElements
+"select foo from Foo foo, Baz baz where foo in elements(baz.fooArray)" OK
+//HQLTest.testCollectionOfComponents
+"from Baz baz inner join baz.components comp where comp.name='foo'" OK
+//HQLTest.testOneToOneJoinedFetch
+"from org.hibernate.test.onetoone.joined.Person p join fetch p.address left join fetch p.mailingAddress" OK
+//HQLTest.testSubclassImplicitJoin
+"from DomesticAnimal da where da.owner.nickName like 'Gavin%'" OK
+"from DomesticAnimal da where da.owner.nickName = 'gavin'" OK
+"from DomesticAnimal da where da.owner.bodyWeight > 0" OK
+//HQLTest.testComponent2
+"from Dog dog where dog.owner.name.first = 'Gavin'" OK
+//HQLTest.testOneToOne
+"from User u where u.human.nickName='Steve'" OK
+"from User u where u.human.name.first='Steve'" OK
+//HQLTest.testSelectClauseImplicitJoin
+"select d.owner.mother from Dog d" OK
+"select d.owner.mother.description from Dog d" OK
+"select d.owner.mother from Dog d, Dog h" OK
+//HQLTest.testFromClauseImplicitJoin
+"from DomesticAnimal da join da.owner.mother m where m.bodyWeight > 10" OK
+//HQLTest.testImplicitJoinInFrom
+"from Human h join h.mother.mother.offspring o" OK
+//HQLTest.testDuplicateImplicitJoinInSelect
+"select an.mother.bodyWeight from Animal an join an.mother m where an.mother.bodyWeight > 10" OK
+"select an.mother.bodyWeight from Animal an where an.mother.bodyWeight > 10" OK
+"select an.mother from Animal an where an.mother.bodyWeight is not null" OK
+"select an.mother.bodyWeight from Animal an order by an.mother.bodyWeight" OK
+//HQLTest.testSelectProperty2
+"select an, mo.bodyWeight from Animal an inner join an.mother mo where an.bodyWeight < mo.bodyWeight" OK
+"select an, mo, an.bodyWeight, mo.bodyWeight from Animal an inner join an.mother mo where an.bodyWeight < mo.bodyWeight" OK
+//HQLTest.testSubclassWhere
+"from PettingZoo pz1, PettingZoo pz2 where pz1.id = pz2.id" OK
+"from PettingZoo pz1, PettingZoo pz2 where pz1.id = pz2" OK
+"from PettingZoo pz where pz.id > 0 " OK
+//HQLTest.testNestedImplicitJoinsInSelect
+"select foo.foo.foo.foo.string from org.hibernate.test.legacy.Foo foo where foo.foo.foo = 'bar'" OK
+"select foo.foo.foo.foo.string from org.hibernate.test.legacy.Foo foo" OK
+//HQLTest.testNestedComponent
+"from org.hibernate.test.legacy.Foo foo where foo.component.subcomponent.name='bar'" OK
+//HQLTest.testNull2
+"from Human h where not( h.nickName is null )" OK
+"from Human h where not( h.nickName is not null )" OK
+//HQLTest.testUnknownFailureFromMultiTableTest
+"from Lower s where s.yetanother.name='name'" OK
+//HQLTest.testJoinInSubselect
+"from Animal a where a in (select m from Animal an join an.mother m)" OK
+"from Animal a where a in (select o from Animal an join an.offspring o)" OK
+//HQLTest.testJoinedSubclassImplicitJoin
+"from org.hibernate.test.legacy.Lower s where s.yetanother.name='name'" OK
+//HQLTest.testProjectProductJoinedSubclass
+"select zoo from Zoo zoo, PettingZoo pz where zoo=pz" OK
+"select zoo, pz from Zoo zoo, PettingZoo pz where zoo=pz" OK
+//HQLTest.testCorrelatedSubselect1
+"from Animal a where exists (from a.offspring o where o.bodyWeight>10)" OK
+//HQLTest.testOuterAliasInSubselect
+"from Human h where h = (from Animal an where an = h)" OK
+//HQLTest.testFetch
+"from Zoo zoo left join zoo.mammals" OK
+"from Zoo zoo left join fetch zoo.mammals" OK
+//HQLTest.testOneToManyElementFunctionInWhere
+"from Zoo zoo where 'dog' in indices(zoo.mammals)" OK
+"from Zoo zoo, Dog dog where dog in elements(zoo.mammals)" OK
+//HQLTest.testManyToManyElementFunctionInSelect
+"select elements(zoo.mammals) from Zoo zoo" OK
+"select indices(zoo.mammals) from Zoo zoo" OK
+//HQLTest.testManyToManyInJoin
+ "select x.id from Human h1 join h1.family x" OK
+"select index(h2) from Human h1 join h1.family h2" OK
+//HQLTest.testManyToManyInSubselect
+ "from Human h1, Human h2 where h2 in (select x.id from h1.family x)" OK
+//HQLTest.testOneToManyIndexAccess
+ "from Zoo zoo where zoo.mammals['dog'] is not null" OK
+//HQLTest.testImpliedSelect
+ "select zoo from Zoo zoo" OK
+ "from Zoo zoo" OK
+ "from Zoo zoo join zoo.mammals m" OK
+ "from Zoo" OK
+ "from Zoo zoo join zoo.mammals" OK
+//HQLTest.testVectorSubselect
+ "from Animal a where ('foo', 'bar') in (select m.description, m.bodyWeight from a.mother m)" OK
+//HQLTest.testWierdSubselectImplicitJoinStuff
+"from Simple s where s = some( select sim from Simple sim where sim.other.count=s.other.count ) and s.other.count > 0" OK
+//HQLTest.testCollectionsInSelect2
+ "select foo.string from Bar bar left join bar.baz.fooArray foo where bar.string = foo.string" OK
+//HQLTest.testAssociationPropertyWithoutAlias
+"from Animal where zoo is null" OK
+//HQLTest.testComponentNoAlias
+"from Human where name.first = 'Gavin'" OK
+//ASTParserLoadingTest.testComponentNullnessChecks
+"from Human where name is null" OK
+"from Human where name is not null" OK
+"from Human where cast(? as string) is null" OK
+"from Human where ? is null" OK
+//ASTParserLoadingTest.testInvalidCollectionDereferencesFail
+"from Animal a join a.offspring o where o.description = 'xyz'" OK
+"from Animal a join a.offspring o where o.father.description = 'xyz'" OK
+"from Animal a join a.offspring o order by o.description" OK
+"from Animal a join a.offspring o order by o.father.description" OK
+"from Animal a order by a.offspring.description" OK
+"from Animal a order by a.offspring.father.description" OK
+//ASTParserLoadingTest.testExpressionWithParamInFunction
+"from Animal where abs(cast(:x as long) - :y) < 2.0" OK
+"from Animal where abs(:x - cast(:y as long)) < 2.0" OK
+"from Animal where abs(cast(:x as long) - cast(:y as long)) < 2.0" OK
+"from Animal where abs(:x - :y) < 2.0" OK
+"from Animal where lower(upper(cast(:foo as string))) like 'f%'" OK
+"from Animal where lower(upper(:foo)) like 'f%'" OK
+"from Animal a where abs(abs(a.bodyWeight - 1.0 + :param) * abs(length('ffobar')-3)) = 3.0" OK
+"from Animal where lower(upper('foo') || upper(cast(:bar as string))) like 'f%'" OK
+"from Animal where lower(upper('foo') || upper(:bar)) like 'f%'" OK
+"from Animal where abs(cast(1 as float) - cast(:param as float)) = 1.0" OK
+//ASTParserLoadingTest.testCrazyIdFieldNames
+"select e.heresAnotherCrazyIdFieldName from MoreCrazyIdFieldNameStuffEntity e" OK
+//ASTParserLoadingTest.testImplicitJoinsInDifferentClauses
+"select e.owner from SimpleAssociatedEntity e" OK
+"select e.id, e.owner from SimpleAssociatedEntity e" OK
+"from SimpleAssociatedEntity e order by e.owner" OK
+"select e.owner.id, count(*) from SimpleAssociatedEntity e group by e.owner" OK
+//ASTParserLoadingTest.testNestedComponentIsNull
+"from Commento c where c.marelo.commento.mcompr is null" OK
+//ASTParserLoadingTest.testSpecialClassPropertyReference
+"select a.description from Animal a where a.class = Mammal" OK
+"select a.class from Animal a" OK
+"from Animal an where an.class = Dog" OK
+//ASTParserLoadingTest.testSpecialClassPropertyReferenceFQN
+"from Zoo zoo where zoo.class = org.hibernate.test.hql.PettingZoo" OK
+"select a.description from Animal a where a.class = org.hibernate.test.hql.Mammal" OK
+"from DomesticAnimal an where an.class = org.hibernate.test.hql.Dog" OK
+"from Animal an where an.class = org.hibernate.test.hql.Dog" OK
+//ASTParserLoadingTest.testSubclassOrSuperclassPropertyReferenceInJoinedSubclass
+"from Zoo z join z.mammals as m where m.name.first = 'John'" OK
+"from Zoo z join z.mammals as m where m.pregnant = false" OK
+"select m.pregnant from Zoo z join z.mammals as m where m.pregnant = false" OK
+"from Zoo z join z.mammals as m where m.description = 'tabby'" OK
+"select m.description from Zoo z join z.mammals as m where m.description = 'tabby'" OK
+"select m.name from Zoo z join z.mammals as m where m.name.first = 'John'" OK
+"select m.pregnant from Zoo z join z.mammals as m" OK
+"select m.description from Zoo z join z.mammals as m" OK
+"select m.name from Zoo z join z.mammals as m" OK
+"from DomesticAnimal da join da.owner as o where o.nickName = 'Gavin'" OK
+"select da.father from DomesticAnimal da join da.owner as o where o.nickName = 'Gavin'" OK
+//ASTParserLoadingTest.testJPAPositionalParameterList
+"from Human where name.last in (?1)" OK
+//ASTParserLoadingTest.testComponentQueries
+"select h.name from Human h" OK
+"from Human h where h.name = h.name" OK
+"from Human h where h.name = :name" OK
+"from Human where name = :name" OK
+"from Human h where :name = h.name" OK
+"from Human h where :name <> h.name" OK
+"from Human h where h.name = ('John', 'X', 'Doe')" OK
+"from Human h where ('John', 'X', 'Doe') = h.name" OK
+"from Human h where ('John', 'X', 'Doe') <> h.name" OK
+"from Human h where ('John', 'X', 'Doe') >= h.name" OK
+"from Human h order by h.name" OK
+//ASTParserLoadingTest.testComponentParameterBinding
+"from Order o where o.customer.name =:name and o.id = :id" OK
+"from Order o where o.id = :id and o.customer.name =:name " OK
+//ASTParserLoadingTest.testAnyMappingReference
+"from PropertySet p where p.someSpecificProperty = :ssp" OK
+//ASTParserLoadingTest.testJdkEnumStyleEnumConstant
+"from Zoo z where z.classification = org.hibernate.test.hql.Classification.LAME" OK
+//ASTParserLoadingTest.testParameterTypeMismatchFailureExpected
+"from Animal a where a.description = :nonstring" OK
+//ASTParserLoadingTest.testMultipleBagFetchesFail
+"from Human h join fetch h.friends f join fetch f.friends fof" OK
+//ASTParserLoadingTest.testCollectionJoinsInSubselect
+"select h.id, h.description from Human h left join h.friends where h in ( select h1 from Human h1 left join h1.friends f where h1.id=1)" OK
+"select h.id, h.description from Human h left join h.friends f where f in ( select h1 from Human h1 left join h1.friends f1 where h = f1 )" OK
+//ASTParserLoadingTest.testCollectionFetchWithDistinctionAndLimit
+"select distinct p from Animal p inner join fetch p.offspring" OK
+"select p from Animal p inner join fetch p.offspring order by p.id" OK
+//ASTParserLoadingTest.testFetchInSubqueryFails
+"from Animal a where a.mother in (select m from Animal a1 inner join a1.mother as m join fetch m.mother)" OK
+//ASTParserLoadingTest.testQueryMetadataRetrievalWithFetching
+"from Animal a inner join fetch a.mother" OK
+//ASTParserLoadingTest.testSuperclassPropertyReferenceAfterCollectionIndexedAccess
+"from Zoo zoo where zoo.mammals['tiger'].mother.bodyWeight > 3.0f" OK
+//ASTParserLoadingTest.testJoinFetchCollectionOfValues
+"select h from Human as h join fetch h.nickNames" OK
+//ASTParserLoadingTest.testIntegerLiterals
+"from Foo where long = 1" OK
+"from Foo where long = 1L" OK
+//ASTParserLoadingTest.testDecimalLiterals
+"from Animal where bodyWeight > 100.0e-10" OK
+"from Animal where bodyWeight > 100.0E-10" OK
+"from Animal where bodyWeight > 100.001f" OK
+"from Animal where bodyWeight > 100.001F" OK
+"from Animal where bodyWeight > 100.001d" OK
+"from Animal where bodyWeight > 100.001D" OK
+"from Animal where bodyWeight > .001f" OK
+"from Animal where bodyWeight > 100e-10" OK
+"from Animal where bodyWeight > .01E-10" OK
+"from Animal where bodyWeight > 1e-38" OK
+//ASTParserLoadingTest.testNakedPropertyRef
+"from Animal where bodyWeight = bodyWeight" OK
+"select bodyWeight from Animal" OK
+"select max(bodyWeight) from Animal" OK
+//ASTParserLoadingTest.testNakedComponentPropertyRef
+"select name from Human" OK
+"select upper(h.name.first) from Human as h" OK
+"select upper(name.first) from Human" OK
+//ASTParserLoadingTest.testNakedImplicitJoins
+"from Animal where mother.father.id = 1" OK
+//ASTParserLoadingTest.testNakedEntityAssociationReference
+"from Animal where mother = :mother" OK
+//ASTParserLoadingTest.testNakedMapIndex
+"from Zoo where mammals['dog'].description like '%black%'" OK
+//ASTParserLoadingTest.testInvalidFetchSemantics
+"select mother from Human a left join fetch a.mother mother" OK
+//ASTParserLoadingTest.testArithmetic
+"select 2*2*2*2*(2*2) from Zoo" OK
+"select 2 / (1+1) from Zoo" OK
+"select 2 - (1+1) from Zoo" OK
+"select 2 - 1 + 1 from Zoo" OK
+"select 2 * (1-1) from Zoo" OK
+"select 4 / (2 * 2) from Zoo" OK
+"select 4 / 2 * 2 from Zoo" OK
+"select 2 * (2/2) from Zoo" OK
+"select 2 * (2/2+1) from Zoo" OK
+//ASTParserLoadingTest.testNestedCollectionFetch
+"from Animal a left join fetch a.offspring o left join fetch o.offspring where a.mother.id = 1 order by a.description" OK
+"from Zoo z left join fetch z.animals a left join fetch a.offspring where z.name ='MZ' order by a.description" OK
+"from Human h left join fetch h.pets a left join fetch a.offspring where h.name.first ='Gavin' order by a.description" OK
+//ASTParserLoadingTest.testSelectClauseSubselect
+"select (select max(z.id) from a.zoo z) from Animal a" OK
+"select (select max(z.id) from a.zoo z where z.name=:name) from Animal a" OK
+//ASTParserLoadingTest.testInitProxy
+"from Animal a" OK
+//ASTParserLoadingTest.testSelectClauseImplicitJoin
+"select distinct a.zoo from Animal a where a.zoo is not null" OK
+//ASTParserLoadingTest.testComponentOrderBy
+"from Human as h order by h.name" OK
+//ASTParserLoadingTest.testCastInSelect
+"select cast(bodyWeight as integer) from Animal" OK
+"select cast(a.bodyWeight as integer) from Animal a" OK
+//ASTParserLoadingTest.testAliases
+"select a.bodyWeight as abw, a.description from Animal a" OK
+"select count(*), avg(a.bodyWeight) as avg from Animal a" OK
+//ASTParserLoadingTest.testParameterMixing
+"from Animal a where a.description = ? and a.bodyWeight = ? or a.bodyWeight = :bw" OK
+//ASTParserLoadingTest.testOrdinalParameters
+"from Animal a where a.description = ? and a.bodyWeight = ?" OK
+"from Animal a where a.bodyWeight in (?, ?)" OK
+//ASTParserLoadingTest.testIndexParams
+"from Zoo zoo where zoo.mammals[:name] = :id" OK
+"from Zoo zoo where zoo.mammals[:name].bodyWeight > :w" OK
+"from Zoo zoo where zoo.animals[:sn].mother.bodyWeight < :mw" OK
+"from Zoo zoo where zoo.animals[:sn].description like :desc and zoo.animals[:sn].bodyWeight > :wmin and zoo.animals[:sn].bodyWeight < :wmax" OK
+"from Human where addresses[:type].city = :city and addresses[:type].country = :country" OK
+//ASTParserLoadingTest.testAggregation
+"select sum(h.bodyWeight) from Human h" OK
+"select avg(h.height) from Human h" OK
+"select max(a.id) from Animal a" OK
+//ASTParserLoadingTest.testSelectClauseCase
+"select case nickName when 'Oney' then 'gavin' when 'Turin' then 'christian' else nickName end from Human" OK
+"select case when bodyWeight > 100 then 'fat' else 'skinny' end from Human" OK
+//ASTParserLoadingTest.testImplicitPolymorphism
+"from java.lang.Comparable" OK
+"from java.lang.Object" OK
+//ASTParserLoadingTest.testCoalesce
+"from Human h where coalesce(h.nickName, h.name.first, h.name.last) = 'max'" OK
+"select nullif(nickName, '1e1') from Human" OK
+//ASTParserLoadingTest.testStr
+"select str(an.bodyWeight) from Animal an where str(an.bodyWeight) like '%1%'" OK
+"select str(an.bodyWeight, 8, 3) from Animal an where str(an.bodyWeight, 8, 3) like '%1%'" OK
+"select str(current_date) from Animal" OK
+"select str(year(current_date))||'-'||str(month(current_date))||'-'||str(day(current_date)) from Animal" OK
+//ASTParserLoadingTest.testCast
+"from Human h where h.nickName like 'G%'" OK
+"from Animal a where cast(a.bodyWeight as string) like '1.%'" OK
+"from Animal a where cast(a.bodyWeight as integer) = 1" OK
+//ASTParserLoadingTest.testExtract
+"select second(current_timestamp()), minute(current_timestamp()), hour(current_timestamp()) from Mammal m" OK
+"select day(m.birthdate), month(m.birthdate), year(m.birthdate) from Mammal m" OK
+"select extract(second from current_timestamp()), extract(minute from current_timestamp()), extract(hour from current_timestamp()) from Mammal m" OK
+"select extract(day from m.birthdate), extract(month from m.birthdate), extract(year from m.birthdate) from Mammal m" OK
+//ASTParserLoadingTest.testSelectExpressions
+"select 'found', lower(h.name.first) from Human h where lower(h.name.first) = 'gavin'" OK
+"select 'found', lower(h.name.first) from Human h where concat(h.name.first, ' ', h.name.initial, ' ', h.name.last) = 'Gavin A King'" OK
+"select 'found', lower(h.name.first) from Human h where h.name.first||' '||h.name.initial||' '||h.name.last = 'Gavin A King'" OK
+"select a.bodyWeight + m.bodyWeight from Animal a join a.mother m" OK
+"select 2.0 * (a.bodyWeight + m.bodyWeight) from Animal a join a.mother m" OK
+"select sum(a.bodyWeight + m.bodyWeight) from Animal a join a.mother m" OK
+"select sum(a.mother.bodyWeight * 2.0) from Animal a" OK
+"select concat(h.name.first, ' ', h.name.initial, ' ', h.name.last) from Human h" OK
+"select h.name.first||' '||h.name.initial||' '||h.name.last from Human h" OK
+"select nickName from Human" OK
+"select lower(nickName) from Human" OK
+"select abs(bodyWeight*-1) from Human" OK
+"select upper(h.name.first||' ('||h.nickName||')') from Human h" OK
+"select abs(a.bodyWeight-:param) from Animal a" OK
+"select abs(:param - a.bodyWeight) from Animal a" OK
+"select lower(upper('foo')) from Animal" OK
+"select lower(upper('foo') || upper('bar')) from Animal" OK
+"select sum(abs(bodyWeight - 1.0) * abs(length('ffobar')-3)) from Animal" OK
+//ASTParserLoadingTest.testImplicitJoin
+"from Animal a where a.mother.bodyWeight < 2.0 or a.mother.bodyWeight > 9.0" OK
+"from Animal a where a.mother.bodyWeight > 2.0 and a.mother.bodyWeight > 9.0" OK
+//ASTParserLoadingTest.testSimpleSelect
+"select a.mother from Animal as a" OK
+//ASTParserLoadingTest.testWhere
+"from Animal an where an.bodyWeight > 10" OK
+"from Animal an where not an.bodyWeight > 10" OK
+"from Animal an where an.bodyWeight between 0 and 10" OK
+"from Animal an where an.bodyWeight not between 0 and 10" OK
+"from Animal an where sqrt(an.bodyWeight)/2 > 10" OK
+"from Animal an where (an.bodyWeight > 10 and an.bodyWeight < 100) or an.bodyWeight is null" OK
+//ASTParserLoadingTest.testEntityFetching
+"from Animal an join fetch an.mother" OK
+"select an from Animal an join fetch an.mother" OK
+//ASTParserLoadingTest.testCollectionFetching
+"from Animal an join fetch an.offspring" OK
+"select an from Animal an join fetch an.offspring" OK
+//ASTParserLoadingTest.testProjectionQueries
+"select an.mother.id, max(an.bodyWeight) from Animal an group by an.mother.id" OK
+//ASTParserLoadingTest.testStandardFunctions
+"select current_time(), current_date(), current_timestamp() from Product" OK
+//ASTParserLoadingTest.testDynamicInstantiationQueries
+"select new list(an.description, an.bodyWeight) from Animal an" OK
+"select new map(an.description, an.bodyWeight) from Animal an" OK
+"select new map(an.description as descr, an.bodyWeight as bw) from Animal an" -> (AAA)
+//ASTParserLoadingTest.testResultTransformerScalarQueries
+"select an.description as description, an.bodyWeight as bodyWeight from Animal an order by bodyWeight desc" OK
+"select a from Animal a, Animal b order by a.id" OK
+//ASTParserLoadingTest.testResultTransformerEntityQueries
+"select an as an from Animal an order by bodyWeight desc" OK
+//ASTParserLoadingTest.testEJBQLFunctions
+"from Animal a where a.description = concat('1', concat('2','3'), '4'||'5')||'0'" OK
+"from Animal a where substring(a.description, 1, 3) = 'cat'" OK
+"from Animal a where lower(a.description) = 'cat'" OK
+"from Animal a where upper(a.description) = 'CAT'" OK
+"select upper(a.description) from Animal a" OK
+"from Animal a where length(a.description) = 5" OK
+"from Animal a where locate('abc', a.description, 2) = 2" OK
+"from Animal a where locate('abc', a.description) = 2" OK
+"select locate('cat', a.description, 2) from Animal a" OK
+"from Animal a where trim(trailing '_' from a.description) = 'cat'" OK
+"from Animal a where trim(leading '_' from a.description) = 'cat'" OK
+"from Animal a where trim(both from a.description) = 'cat'" OK
+"from Animal a where trim(a.description) = 'cat'" OK
+"from Animal a where abs(a.bodyWeight) = sqrt(a.bodyWeight)" OK
+"from Animal a where mod(16, 4) = 4" OK
+"from Animal a where bit_length(a.bodyWeight) = 24" OK
+"select bit_length(a.bodyWeight) from Animal a" OK
+"from Animal a where a.description like '%a%'" OK
+"from Animal a where a.description not like '%a%'" OK
+"from Animal a where a.description like 'x%ax%' escape 'x'" OK
+//ASTParserLoadingTest.testSubselectBetween
+"from Animal x where (select max(a.bodyWeight) from Animal a) between 0 and 100" OK
+//
+"from Animal x where (x.name, x.bodyWeight) = ('cat', 20)" OK
+
+/*
+DELETE STATEMENT
+*/
+"delete Animal where mother is not null" OK
+"delete Animal where not mother is not null" OK
+"delete Animal" OK
+"delete from Thing" OK
+"delete from Person" OK
+"delete from Location" OK
+"delete from Child" OK
+"delete from Parent" OK
+"delete from Item" OK
+"delete Customer where contactOwner is not null" OK
+"delete Employee where manager is not null" OK
+"delete Person" OK
+"delete Locality" OK
+"delete Country" OK
+"delete Continent" OK
+"delete from DataPoint" OK
+"delete from User where userid = :userid" OK
+"delete from Mail where alias = :alias" OK
+"delete from NumberedNode where name like 'child%'" OK
+"delete from fooArray where id_='???' and i>=8" OK
+"delete from t_user" OK
+"delete Animal where not description like 'root%'" OK
+"delete Animal where description like 'grand%'" OK
+"delete from Animal where mother is not null or father is not null" OK
+"delete Animal where mother = :mother" OK
+"delete EntityWithCrazyCompositeKey where id.id = 1 and id.otherId = 2" OK
+"delete from EntityWithCrazyCompositeKey where id.id = 1 and id.otherId = 2" OK
+"delete from EntityWithCrazyCompositeKey e where e.id.id = 1 and e.id.otherId = 2" OK
+"delete from Bar where barString = 's'" OK
+"delete Vehicle where owner = :owner" OK
+"delete Mammal where bodyWeight > 150" OK
+"delete from User u where u not in (select u from User u)" OK
+"delete SimpleEntityWithAssociation e where size( e.associatedEntities ) = 0 and e.name like '%'" OK
+"delete Animal where bodyWeight = null" OK
+"delete from PICKUP" OK
+"delete from Address where id = ? and version = ?" OK
+"delete Address[1]" FAIL
+/*
+UDPATE STATEMENT
+*/
+"update Paper set color = :newColor" OK
+"update Document set name = :newName where name = :oldName" OK
+"update Mammal set bodyWeight = null" OK
+"update Zoo set address.city = null" OK
+"update PettingZoo set address.city = null" OK
+"update Vehicle set owner = null where owner = 'Steve'" OK
+"update Vehicle set owner = 'Steve'" OK
+"update Mammal set bodyWeight = ( select max(bodyWeight) from Animal )" OK
+"update Mammal set bodyWeight = 25" OK
+"update Mammal set description = description" OK
+"update Animal set bodyWeight = bodyWeight + :w1 + :w2" OK
+"update Animal set description = :newDesc where description = :desc" OK
+"update Animal set description = description where description = :desc" OK
+"update Zoo as z set name = name where id = :id" OK
+"update Zoo as z set z.name = z.name" OK
+"update PettingZoo pz set pz.name = pz.name where pz.id = :id" OK
+"update PettingZoo set name = name" OK
+"update Human set mother.name.initial = :initial" OK
+"update Animal a set a.mother = (from Animal where id = 1) where a.id = 2" OK
+"update Animal a set a.mother = null where a.id = 2" OK
+"update Human set name.first = :correction where id = :id" OK
+"update versioned TimestampVersioned set name = name" OK
+"update versioned IntegerVersioned set name = name" OK
+<<update SimpleEntityWithAssociation e
+ set e.name = 'updated'
+ where exists (
+ select a.id
+ from e.associatedEntities a
+ where a.name = 'one-to-many-association'
+ )>> OK
+<<update SimpleEntityWithAssociation e
+ set e.name = 'updated'
+ where exists (
+ select a.id
+ from e.manyToManyAssociatedEntities a
+ where a.name = 'many-to-many-association'
+ )>> OK
+<<update Human h
+ set h.description = 'updated'
+ where exists (
+ select f.id
+ from h.friends f
+ where f.name.last = 'Public'
+ )>> OK
+"update Human set Human.description = 'xyz' where Human.id = 1 and Human.description is null" OK
+"update BooleanLiteralEntity set yesNoBoolean = true, trueFalseBoolean = true, zeroOneBoolean = true" OK
+"update BooleanLiteralEntity set yesNoBoolean = :b1, trueFalseBoolean = :b2, zeroOneBoolean = :b3" OK
+"update NonExistentEntity e set e.someProp = ?" OK
+"update Customer c set c.company = 'XYZ'" OK
+"update User u set u.username = :un where u.name = :n" OK
+"update Person p set p.name = '<male>'" OK
+"update Person p set p.name = 'Shawn'" OK
+"update Address set city = ?, state=?, zip=?, version = ? where id in (select aid from Person)" OK
+"update Address set city = ?, state=?, zip=?, version = ? where id = ? and version = ? " OK
+/*
+INSERT STATEMENT
+*/
+"insert into Simple ( name, address, count_, date_, other, id_ ) values ( ?, ?, ?, ?, ?, ? )" FAIL
+"insert into Animal (description, bodyWeight) select h.description, h.bodyWeight from Human h join h.mother m where m.mother is not null" OK
+"insert into Animal (description, bodyWeight) select h.description, h.bodyWeight from Human h where h.mother.mother is not null" OK
+"insert into TimestampVersioned ( name ) select name from TimestampVersioned" OK
+"insert into IntegerVersioned ( name ) select name from IntegerVersioned" OK
+"insert into PettingZoo (name) select name from Zoo" OK
+"insert into Joiner (name, joinedName) select vin, owner from Car" OK
+"insert into Human (id, bodyWeight) select id, bodyWeight from Lizard" OK
+"insert into Pickup (owner, vin, id) select id, vin, owner from Car" OK
+"insert into Animal (description, bodyWeight, mother) select description, bodyWeight, mother from Human" OK
+"insert into PICKUP (id, vin, owner) select id, vin, owner from Car" OK
+"insert into Pickup (id, vin, owner) select id, vin, owner from Car" OK
+"insert into Address (city, state, zip, \"from\") values (?, ?, ?, 'insert value')" FAIL
+"insert Address" FAIL
+"insert a.b.c.Address" FAIL
+
+/*
+filterStatement:
+"order by this.id" OK
+"where this.name = ?" OK
+"where this.quantity > :quantity" OK
+"where this.bodyWeight > ?" OK
+"where this.bodyWeight < ?" OK
+*/
\ No newline at end of file
Property changes on: core/branches/antlr3/src/test/gunit/org/hibernate/sql/ast/phase/hql/parse/TempgUnitHQLGrammar.testsuite
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: core/branches/antlr3/src/test/gunit/org/hibernate/sql/ast/phase/hql/parse/gUnitGenaratedAST.testsuite
===================================================================
--- core/branches/antlr3/src/test/gunit/org/hibernate/sql/ast/phase/hql/parse/gUnitGenaratedAST.testsuite 2009-04-15 19:18:26 UTC (rev 16347)
+++ core/branches/antlr3/src/test/gunit/org/hibernate/sql/ast/phase/hql/parse/gUnitGenaratedAST.testsuite 2009-04-16 00:18:25 UTC (rev 16348)
@@ -18,7 +18,7 @@
//testVariousPropertyReferences
"from A a where b = 1" OK
"from A a where a.b.c = 1" OK
-"from X x where y[1].z = 2" OK
+"from X x where y[1].z = 2" -> (QUERY (QUERY_SPEC (SELECT_FROM (from (PERSISTER_SPACE (ENTITY_PERSISTER_REF X x)))) (where (= (GENERIC_ELEMENT (. ([ y 1) z)) 2))))
"from X x where x.y[1].z = 2" OK
//testEntityNamePathWithKeyword
"from org.hibernate.test.Inner" OK
@@ -89,7 +89,7 @@
/**
* Section 9.8 - Expressions *
*/
-"from eg.DomesticCat cat where cat.name between 'A' and 'B'" OK
+"from eg.DomesticCat cat where cat.name between 'A' and 'B'" -> (QUERY (QUERY_SPEC (SELECT_FROM (from (PERSISTER_SPACE (ENTITY_PERSISTER_REF eg.DomesticCat cat)))) (where (LOGICAL_EXPR (between (GENERIC_ELEMENT (. cat name)) (BETWEEN_LIST (EXPR 'A') (EXPR 'B')))))))
"from eg.DomesticCat cat where cat.name in ( 'Foo', 'Bar', 'Baz' )" OK
"from eg.DomesticCat cat where cat.name not between 'A' and 'B'" OK
"from eg.DomesticCat cat where cat.name not in ( 'Foo', 'Bar', 'Baz' )" OK
@@ -1502,7 +1502,7 @@
"from Animal an where an.bodyWeight between 0 and 10" OK
"from Animal an where an.bodyWeight not between 0 and 10" OK
"from Animal an where sqrt(an.bodyWeight)/2 > 10" OK
-"from Animal an where (an.bodyWeight > 10 and an.bodyWeight < 100) or an.bodyWeight is null" OK
+"from Animal an where (an.bodyWeight > 10 and an.bodyWeight < 100) or an.bodyWeight is null" -> (A)
//ASTParserLoadingTest.testEntityFetching
"from Animal an join fetch an.mother" OK
"select an from Animal an join fetch an.mother" OK
Added: core/branches/antlr3/src/test/gunit/org/hibernate/sql/ast/phase/hql/parse/gUnitHQLTreeWalker.testsuite
===================================================================
--- core/branches/antlr3/src/test/gunit/org/hibernate/sql/ast/phase/hql/parse/gUnitHQLTreeWalker.testsuite (rev 0)
+++ core/branches/antlr3/src/test/gunit/org/hibernate/sql/ast/phase/hql/parse/gUnitHQLTreeWalker.testsuite 2009-04-16 00:18:25 UTC (rev 16348)
@@ -0,0 +1,1660 @@
+gunit HQLTreeWalker walks HQL;
+
+@header{
+package org.hibernate.sql.ast.phase.hql.parse;
+}
+
+
+statement walks statement:
+
+/*
+SELECT/FROM STATEMENT
+*/
+//testSimpleFrom
+"from com.acme.EntityName e" OK
+//testConstantUsage
+"from com.acme.EntityName where prop = org.hibernate.sql.ast.phase.hql.parse.ParserTest.CONSTANT" OK
+"from com.acme.EntityName where prop = compProp.subProp" OK
+//testVariousPropertyReferences
+"from A a where b = 1" OK
+"from A a where a.b.c = 1" OK
+"from X x where y[1].z = 2" OK
+"from X x where x.y[1].z = 2" OK
+//testEntityNamePathWithKeyword
+"from org.hibernate.test.Inner" OK
+//testWhereClauseIdentPrimaryWithEmbeddedKeyword
+"from org.hibernate.test.Inner i where i.outer.inner.middle = 'xyz'" OK
+//testDynamicInstantiation
+"select new list(a, mate) from Animal a join a.mate as mate" OK
+//testListOrMapKeywordReference
+"select p from eg.NameList nl, eg.Person p where p.name = some elements(nl.names)" OK
+"select p from eg.NameList list, eg.Person p where p.name = some elements(list.names)" OK
+"select p from eg.NameList map, eg.Person p where p.name = some elements(map.names)" OK
+//testExplicitPropertyJoin
+"from eg.Cat as cat inner join fetch cat.mate as m fetch all properties left join fetch cat.kittens as k" OK
+// tests copied over from org.hibernate.test.hql.HqlParserTest ~~~~~~~~~~~~
+"from Animal a where a in (from Cat union from Dog)" OK
+/**
+ * Section 9.2 - from *
+ */
+"from eg.Cat" OK
+"from eg.Cat as cat" OK
+"from eg.Cat cat" OK
+"from Formula, Parameter" OK
+"from Formula as form, Parameter as param" OK
+/**
+ * Section 9.3 - Associations and joins *
+ */
+"from eg.Cat as cat inner join cat.mate as mate left outer join cat.kittens as kitten" OK
+"from eg.Cat as cat left join cat.mate.kittens as kittens" OK
+"from Formula form full join form.parameter param" OK
+"from eg.Cat as cat join cat.mate as mate left join cat.kittens as kitten" OK
+"from eg.Cat as cat inner join fetch cat.mate left join fetch cat.kittens" OK
+/**
+ * Section 9.4 - Select *
+ */
+"select mate from eg.Cat as cat inner join cat.mate as mate" OK
+"select cat.mate from eg.Cat cat" OK
+"select elements(cat.kittens) from eg.Cat cat" OK
+"select cat.name from eg.DomesticCat cat where cat.name like 'fri%'" OK
+"select cust.name.firstName from Customer as cust" OK
+"select mother, offspr, mate.name from eg.DomesticCat as mother inner join mother.mate as mate left outer join mother.kittens as offspr" OK
+"select new Family(mother, mate, offspr) from eg.DomesticCat as mother join mother.mate as mate left join mother.kittens as offspr" OK
+/**
+ * Section 9.5 - Aggregate functions *
+ */
+"select avg(cat.weight), sum(cat.weight), max(cat.weight), count(cat) from eg.Cat cat" OK
+"select cat, count( elements(cat.kittens) ) from eg.Cat cat group by cat" OK
+"select distinct cat.name from eg.Cat cat" OK
+"select count(distinct cat.name), count(cat) from eg.Cat cat" OK
+/**
+ * Section 9.6 - Polymorphism *
+ */
+"from java.lang.Object o" OK
+"from eg.Named n, eg.Named m where n.name = m.name" OK
+/**
+ * Section 9.7 - Where *
+ */
+"from eg.Cat as cat where cat.name='Fritz'" OK
+"select foo from eg.Foo foo, eg.Bar bar where foo.startDate = bar.date" OK
+"from eg.Cat cat where cat.mate.name is not null" OK
+"from eg.Cat cat, eg.Cat rival where cat.mate = rival.mate" OK
+"select cat, mate from eg.Cat cat, eg.Cat mate where cat.mate = mate" OK
+"from eg.Cat as cat where cat.id = 123" OK
+"from eg.Cat as cat where cat.mate.id = 69" OK
+"from bank.Person person where person.id.country = 'AU' and person.id.medicareNumber = 123456" OK
+"from bank.Account account where account.owner.id.country = 'AU' and account.owner.id.medicareNumber = 123456" OK
+"from eg.Cat cat where cat.class = eg.DomesticCat" OK
+"from eg.AuditLog log, eg.Payment payment where log.item.class = 'eg.Payment' and log.item.id = payment.id" OK
+/**
+ * Section 9.8 - Expressions *
+ */
+"from eg.DomesticCat cat where cat.name between 'A' and 'B'" OK
+"from eg.DomesticCat cat where cat.name in ( 'Foo', 'Bar', 'Baz' )" OK
+"from eg.DomesticCat cat where cat.name not between 'A' and 'B'" OK
+"from eg.DomesticCat cat where cat.name not in ( 'Foo', 'Bar', 'Baz' )" OK
+"from eg.Cat cat where cat.kittens.size > 0" OK
+"from eg.Cat cat where size(cat.kittens) > 0" OK
+//"from Calendar cal where cal.holidays.maxElement > current date" OK
+"from Order order where maxindex(order.items) > 100" OK
+"from Order order where minelement(order.items) > 10000" OK
+"from Order ord where maxindex(ord.items) > 100" OK
+"from Order ord where minelement(ord.items) > 10000" OK
+"select mother from eg.Cat as mother, eg.Cat as kit where kit in elements(foo.kittens)" OK
+"select p from eg.NameList list, eg.Person p where p.name = some elements(list.names)" OK
+"from eg.Cat cat where exists elements(cat.kittens)" OK
+"from eg.Player p where 3 > all elements(p.scores)" OK
+"from eg.Show show where 'fizard' in indices(show.acts)" OK
+"from Order order where order.items[0].id = 1234" OK
+"select person from Person person, Calendar calendar where calendar.holidays['national day'] = person.birthDay and person.nationality.calendar = calendar" OK
+"select item from Item item, Order order where order.items[ order.deliveredItemIndices[0] ] = item and order.id = 11" OK
+"select item from Item item, Order order where order.items[ maxindex(order.items) ] = item and order.id = 11" OK
+"from Order ord where ord.items[0].id = 1234" OK
+"select item from Item item, Order ord where ord.items[ ord.deliveredItemIndices[0] ] = item and ord.id = 11" OK
+"select item from Item item, Order ord where ord.items[ maxindex(ord.items) ] = item and ord.id = 11" OK
+"select item from Item item, Order ord where ord.items[ size(ord.items) - 1 ] = item" OK
+"from eg.DomesticCat cat where upper(cat.name) like 'FRI%'" OK
+"select cust from Product prod, Store store inner join store.customers cust where prod.name = 'widget' and store.location.name in ( 'Melbourne', 'Sydney' ) and prod = all elements(cust.currentOrder.lineItems)" OK
+//testDocoExamples99
+"from eg.DomesticCat cat order by cat.name asc, cat.weight desc, cat.birthdate" OK
+//testDocoExamples910
+"select cat.color, sum(cat.weight), count(cat) from eg.Cat cat group by cat.color" OK
+"select foo.id, avg( elements(foo.names) ), max( indices(foo.names) ) from eg.Foo foo group by foo.id" OK
+"select cat.color, sum(cat.weight), count(cat) from eg.Cat cat group by cat.color having cat.color in (eg.Color.TABBY, eg.Color.BLACK)" OK
+"select cat from eg.Cat cat join cat.kittens kitten group by cat having avg(kitten.weight) > 100 order by count(kitten) asc, sum(kitten.weight) desc" OK
+//testDocoExamples911
+"from eg.Cat as fatcat where fatcat.weight > (select avg(cat.weight) from eg.DomesticCat cat)" OK
+"from eg.DomesticCat as cat where cat.name = some (select name.nickName from eg.Name as name)" OK
+"from eg.Cat as cat where not exists (from eg.Cat as mate where mate.mate = cat)" OK
+"from eg.DomesticCat as cat where cat.name not in (select name.nickName from eg.Name as name)" OK
+//testDocoExamples912
+<<select ord.id, sum(price.amount), count(item)
+ from Order as ord join ord.lineItems as item
+ join item.product as product, Catalog as catalog
+ join catalog.prices as price
+ where ord.paid = false
+ and ord.customer = :customer
+ and price.product = product
+ and catalog.effectiveDate < sysdate
+ and catalog.effectiveDate >= all (
+ select cat.effectiveDate from Catalog as cat where cat.effectiveDate < sysdate)
+ group by ord
+ having sum(price.amount) > :minAmount
+ order by sum(price.amount) desc>> OK
+<<select ord.id, sum(price.amount), count(item)
+ from Order as ord join ord.lineItems as item join item.product as product,
+ Catalog as catalog join catalog.prices as price
+ where ord.paid = false and ord.customer = :customer
+ and price.product = product and catalog = :currentCatalog
+ group by ord having sum(price.amount) > :minAmount
+ order by sum(price.amount) desc>> OK
+<<select count(payment), status.name
+ from Payment as payment
+ join payment.currentStatus as status
+ join payment.statusChanges as statusChange
+ where payment.status.name <> PaymentStatus.AWAITING_APPROVAL
+ or (
+ statusChange.timeStamp = (
+ select max(change.timeStamp)
+ from PaymentStatusChange change
+ where change.payment = payment
+ )
+ and statusChange.user <> :currentUser
+ )
+ group by status.name, status.sortOrder
+ order by status.sortOrder>> OK
+<<select count(payment), status.name
+ from Payment as payment
+ join payment.currentStatus as status
+ where payment.status.name <> PaymentStatus.AWAITING_APPROVAL
+ or payment.statusChanges[ maxIndex(payment.statusChanges) ].user <> :currentUser
+ group by status.name, status.sortOrder
+ order by status.sortOrder>> OK
+<<select account, payment
+ from Account as account
+ left outer join account.payments as payment
+ where :currentUser in elements(account.holder.users)
+ and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, PaymentStatus.UNPAID)
+ order by account.type.sortOrder, account.accountNumber, payment.dueDate>> OK
+<<select account, payment
+ from Account as account
+ join account.holder.users as user
+ left outer join account.payments as payment
+ where :currentUser = user
+ and PaymentStatus.UNPAID = isNull(payment.currentStatus.name, PaymentStatus.UNPAID)
+ order by account.type.sortOrder, account.accountNumber, payment.dueDate>> OK
+//testExamples1
+"select new org.hibernate.test.S(s.count, s.address) from s in class Simple" OK
+"select s.name, sysdate, trunc(s.pay), round(s.pay) from s in class Simple" OK
+"select abs(round(s.pay)) from s in class Simple" OK
+"select trunc(round(sysdate)) from s in class Simple" OK
+//testMultipleActualParameters
+"select round(s.pay, 2) from s" OK
+//testMultipleFromClasses
+"from eg.mypackage.Cat qat, com.toadstool.Foo f" OK
+"from eg.mypackage.Cat qat, org.jabberwocky.Dipstick" OK
+//testFromWithJoin
+"from eg.mypackage.Cat qat, com.toadstool.Foo f join net.sf.blurb.Blurb" OK
+"from eg.mypackage.Cat qat left join com.multijoin.JoinORama , com.toadstool.Foo f join net.sf.blurb.Blurb" OK
+//testSelect
+"select f from eg.mypackage.Cat qat, com.toadstool.Foo f join net.sf.blurb.Blurb" OK
+"select distinct bar from eg.mypackage.Cat qat left join com.multijoin.JoinORama as bar, com.toadstool.Foo f join net.sf.blurb.Blurb" OK
+"select count(*) from eg.mypackage.Cat qat" OK
+"select avg(qat.weight) from eg.mypackage.Cat qat" OK
+//testWhere
+"from eg.mypackage.Cat qat where qat.name like '%fluffy%' or qat.toes > 5" OK
+"from eg.mypackage.Cat qat where not qat.name like '%fluffy%' or qat.toes > 5" OK
+"from eg.mypackage.Cat qat where not qat.name not like '%fluffy%'" OK
+"from eg.mypackage.Cat qat where qat.name in ('crater','bean','fluffy')" OK
+"from eg.mypackage.Cat qat where qat.name not in ('crater','bean','fluffy')" OK
+//testGroupBy
+"from eg.mypackage.Cat qat group by qat.breed" OK
+"from eg.mypackage.Cat qat group by qat.breed, qat.eyecolor" OK
+//testOrderBy
+"from eg.mypackage.Cat qat order by avg(qat.toes)" OK
+"from Animal an order by sqrt(an.bodyWeight)/2" OK
+//testDoubleLiteral
+"from eg.Cat as tinycat where fatcat.weight < 3.1415" OK
+"from eg.Cat as enormouscat where fatcat.weight > 3.1415e3" OK
+//testComplexConstructor
+"select new Foo(count(bar)) from bar" OK
+"select new Foo(count(bar),(select count(*) from doofus d where d.gob = 'fat' )) from bar" OK
+//testInNotIn
+"from foo where foo.bar in ('a' , 'b', 'c')" OK
+"from foo where foo.bar not in ('a' , 'b', 'c')" OK
+//testOperatorPrecedence
+"from foo where foo.bar = 123 + foo.baz * foo.not" OK
+"from foo where foo.bar like 'testzzz' || foo.baz or foo.bar in ('duh', 'gob')" OK
+//testUnitTestHql
+"select foo from foo in class org.hibernate.test.Foo, fee in class org.hibernate.test.Fee where foo.dependent = fee order by foo.string desc, foo.component.count asc, fee.id" OK
+"select foo.foo, foo.dependent from foo in class org.hibernate.test.Foo order by foo.foo.string desc, foo.component.count asc, foo.dependent.id" OK
+"select foo from foo in class org.hibernate.test.Foo order by foo.dependent.id, foo.dependent.fi" OK
+"select one from one in class org.hibernate.test.One order by one.value asc" OK
+"select many.one from many in class org.hibernate.test.Many order by many.one.value asc, many.one.id" OK
+"select foo.id from org.hibernate.test.Foo foo where foo.joinedProp = 'foo'" OK
+"from org.hibernate.test.Foo foo inner join fetch foo.foo" OK
+"from org.hibernate.test.Baz baz left outer join fetch baz.fooToGlarch" OK
+"select foo.foo.foo.string from foo in class org.hibernate.test.Foo where foo.foo = 'bar'" OK
+"select foo.foo.foo.foo.string from foo in class org.hibernate.test.Foo where foo.foo.foo = 'bar'" OK
+"select foo.foo.foo.string from foo in class org.hibernate.test.Foo where foo.foo.foo.foo.string = 'bar'" OK
+"select foo.string from foo in class org.hibernate.test.Foo where foo.foo.foo = 'bar' and foo.foo.foo.foo = 'baz'" OK
+"select foo.string from foo in class org.hibernate.test.Foo where foo.foo.foo.foo.string = 'a' and foo.foo.string = 'b'" OK
+"from org.hibernate.test.Foo as foo where foo.component.glarch.name is not null" OK
+"from org.hibernate.test.Foo as foo left outer join foo.component.glarch as glarch where glarch.name = 'foo'" OK
+"from org.hibernate.test.Foo" OK
+"from org.hibernate.test.Foo foo left outer join foo.foo" OK
+"from org.hibernate.test.Foo, org.hibernate.test.Bar" OK
+"from org.hibernate.test.Baz baz left join baz.fooToGlarch, org.hibernate.test.Bar bar join bar.foo" OK
+"from org.hibernate.test.Baz baz left join baz.fooToGlarch join baz.fooSet" OK
+"from org.hibernate.test.Baz baz left join baz.fooToGlarch join fetch baz.fooSet foo left join fetch foo.foo" OK
+"from foo in class org.hibernate.test.Foo where foo.string='osama bin laden' and foo.boolean = true order by foo.string asc, foo.component.count desc" OK
+"from foo in class org.hibernate.test.Foo where foo.string='osama bin laden' order by foo.string asc, foo.component.count desc" OK
+"select foo.foo from foo in class org.hibernate.test.Foo" OK
+"from foo in class org.hibernate.test.Foo where foo.component.count is null order by foo.component.count" OK
+"from foo in class org.hibernate.test.Foo where foo.component.name='foo'" OK
+"select distinct foo.component.name, foo.component.name from foo in class org.hibernate.test.Foo where foo.component.name='foo'" OK
+"select distinct foo.component.name, foo.id from foo in class org.hibernate.test.Foo where foo.component.name='foo'" OK
+"from foo in class org.hibernate.test.Foo where foo.id=?" OK
+"from foo in class org.hibernate.test.Foo where foo.key=?" OK
+"select foo.foo from foo in class org.hibernate.test.Foo where foo.string='fizard'" OK
+"from foo in class org.hibernate.test.Foo where foo.component.subcomponent.name='bar'" OK
+"select foo.foo from foo in class org.hibernate.test.Foo where foo.foo.id=?" OK
+"from foo in class org.hibernate.test.Foo where foo.foo = ?" OK
+"from bar in class org.hibernate.test.Bar where bar.string='a string' or bar.string='a string'" OK
+"select foo.component.name, elements(foo.component.importantDates) from foo in class org.hibernate.test.Foo where foo.foo.id=?" OK
+"select max(elements(foo.component.importantDates)) from foo in class org.hibernate.test.Foo group by foo.id" OK
+"select foo.foo.foo.foo from foo in class org.hibernate.test.Foo, foo2 in class org.hibernate.test.Foo where foo = foo2.foo and not not ( not foo.string='fizard' ) and foo2.string between 'a' and (foo.foo.string) and ( foo2.string in ( 'fiz', 'blah') or 1=1 )" OK
+"from foo in class org.hibernate.test.Foo where foo.string='from BoogieDown -tinsel town =!@#$^&*())'" OK
+"from foo in class org.hibernate.test.Foo where not foo.string='foo''bar'" OK
+"from foo in class org.hibernate.test.Foo where foo.component.glarch.next is null" OK
+"from bar in class org.hibernate.test.Bar where bar.baz.count=667 and bar.baz.count!=123 and not bar.baz.name='1-E-1'" OK
+"from i in class org.hibernate.test.Bar where i.baz.name='Bazza'" OK
+"select count(distinct foo.foo) from foo in class org.hibernate.test.Foo" OK
+"select count(foo.foo.boolean) from foo in class org.hibernate.test.Foo" OK
+"select count(*), foo.int from foo in class org.hibernate.test.Foo group by foo.int" OK
+"select sum(foo.foo.int) from foo in class org.hibernate.test.Foo" OK
+"select count(foo) from foo in class org.hibernate.test.Foo where foo.id=?" OK
+"from foo in class org.hibernate.test.Foo where foo.boolean = ?" OK
+"select new Foo(fo.x) from org.hibernate.test.Fo fo" OK
+"select new Foo(fo.integer) from org.hibernate.test.Foo fo" OK
+"select new Foo(fo.x) from org.hibernate.test.Foo fo" OK
+"select foo.long, foo.component.name, foo, foo.foo from foo in class org.hibernate.test.Foo" OK
+"select avg(foo.float), max(foo.component.name), count(distinct foo.id) from foo in class org.hibernate.test.Foo" OK
+"select foo.long, foo.component, foo, foo.foo from foo in class org.hibernate.test.Foo" OK
+"from o in class org.hibernate.test.MoreStuff" OK
+"from o in class org.hibernate.test.Many" OK
+"from o in class org.hibernate.test.Fee" OK
+"from o in class org.hibernate.test.Qux" OK
+"from o in class org.hibernate.test.Y" OK
+"from o in class org.hibernate.test.Fumm" OK
+"from o in class org.hibernate.test.X" OK
+"from o in class org.hibernate.test.Simple" OK
+"from o in class org.hibernate.test.Location" OK
+"from o in class org.hibernate.test.Holder" OK
+"from o in class org.hibernate.test.Part" OK
+"from o in class org.hibernate.test.Baz" OK
+"from o in class org.hibernate.test.Vetoer" OK
+"from o in class org.hibernate.test.Sortable" OK
+"from o in class org.hibernate.test.Contained" OK
+"from o in class org.hibernate.test.Stuff" OK
+"from o in class org.hibernate.test.Immutable" OK
+"from o in class org.hibernate.test.Container" OK
+"from o in class org.hibernate.test.X$XX" OK
+"from o in class org.hibernate.test.One" OK
+"from o in class org.hibernate.test.Foo" OK
+"from o in class org.hibernate.test.Fo" OK
+"from o in class org.hibernate.test.Glarch" OK
+"from o in class org.hibernate.test.Fum" OK
+"from n in class org.hibernate.test.Holder" OK
+"from n in class org.hibernate.test.Baz" OK
+"from n in class org.hibernate.test.Bar" OK
+"from n in class org.hibernate.test.Glarch" OK
+"from n in class org.hibernate.test.Holder where n.name is not null" OK
+"from n in class org.hibernate.test.Baz where n.name is not null" OK
+"from n in class org.hibernate.test.Bar where n.name is not null" OK
+"from n in class org.hibernate.test.Glarch where n.name is not null" OK
+"from n0 in class org.hibernate.test.Holder, n1 in class org.hibernate.test.Holder where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Baz, n1 in class org.hibernate.test.Holder where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Bar, n1 in class org.hibernate.test.Holder where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Glarch, n1 in class org.hibernate.test.Holder where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Holder, n1 in class org.hibernate.test.Baz where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Baz, n1 in class org.hibernate.test.Baz where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Bar, n1 in class org.hibernate.test.Baz where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Glarch, n1 in class org.hibernate.test.Baz where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Holder, n1 in class org.hibernate.test.Bar where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Baz, n1 in class org.hibernate.test.Bar where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Bar, n1 in class org.hibernate.test.Bar where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Glarch, n1 in class org.hibernate.test.Bar where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Holder, n1 in class org.hibernate.test.Glarch where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Baz, n1 in class org.hibernate.test.Glarch where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Bar, n1 in class org.hibernate.test.Glarch where n0.name = n1.name" OK
+"from n0 in class org.hibernate.test.Glarch, n1 in class org.hibernate.test.Glarch where n0.name = n1.name" OK
+"from n in class org.hibernate.test.Holder where n.name = :name" OK
+"select baz.code, min(baz.count) from baz in class org.hibernate.test.Baz group by baz.code" OK
+"selecT baz from baz in class org.hibernate.test.Baz where baz.stringDateMap['foo'] is not null or baz.stringDateMap['bar'] = ?" OK
+"select baz from baz in class org.hibernate.test.Baz where baz.stringDateMap['now'] is not null" OK
+"select baz from baz in class org.hibernate.test.Baz where baz.stringDateMap['now'] is not null and baz.stringDateMap['big bang'] < baz.stringDateMap['now']" OK
+"select index(date) from org.hibernate.test.Baz baz join baz.stringDateMap as date" OK
+"select index(date) from org.hibernate.test.Baz baz join baz.stringDateMap date" OK
+"from foo in class org.hibernate.test.Foo where foo.integer not between 1 and 5 and foo.string not in ('cde', 'abc') and foo.string is not null and foo.integer<=3" OK
+"from org.hibernate.test.Baz baz inner join baz.collectionComponent.nested.foos foo where foo.string is null" OK
+"from org.hibernate.test.Baz baz inner join baz.fooSet where '1' in (from baz.fooSet foo where foo.string is not null)" OK
+"from org.hibernate.test.Baz baz where 'a' in elements(baz.collectionComponent.nested.foos) and 1.0 in elements(baz.collectionComponent.nested.floats)" OK
+"from org.hibernate.test.Foo foo join foo.foo where foo.foo in ('1','2','3')" OK
+"select foo.foo from org.hibernate.test.Foo foo where foo.foo in ('1','2','3')" OK
+"select foo.foo.string from org.hibernate.test.Foo foo where foo.foo in ('1','2','3')" OK
+"select foo.foo.string from org.hibernate.test.Foo foo where foo.foo.string in ('1','2','3')" OK
+"select foo.foo.long from org.hibernate.test.Foo foo where foo.foo.string in ('1','2','3')" OK
+"select count(*) from org.hibernate.test.Foo foo where foo.foo.string in ('1','2','3') or foo.foo.long in (1,2,3)" OK
+"select count(*) from org.hibernate.test.Foo foo where foo.foo.string in ('1','2','3') group by foo.foo.long" OK
+"from org.hibernate.test.Foo foo1 left join foo1.foo foo2 left join foo2.foo where foo1.string is not null" OK
+"from org.hibernate.test.Foo foo1 left join foo1.foo.foo where foo1.string is not null" OK
+"from org.hibernate.test.Foo foo1 left join foo1.foo foo2 left join foo1.foo.foo foo3 where foo1.string is not null" OK
+"select foo.formula from org.hibernate.test.Foo foo where foo.formula > 0" OK
+"from org.hibernate.test.Foo as foo join foo.foo as foo2 where foo2.id >'a' or foo2.id <'a'" OK
+"from org.hibernate.test.Holder" OK
+"from org.hibernate.test.Baz baz left outer join fetch baz.manyToAny" OK
+"from org.hibernate.test.Baz baz join baz.manyToAny" OK
+"select baz from org.hibernate.test.Baz baz join baz.manyToAny a where index(a) = 0" OK
+"select bar from org.hibernate.test.Bar bar where bar.baz.stringDateMap['now'] is not null" OK
+"select bar from org.hibernate.test.Bar bar join bar.baaz b where b.stringDateMap['big bang'] < b.stringDateMap['now'] and b.stringDateMap['now'] is not null" OK
+"select bar from org.hibernate.test.Bar bar where bar.baz.stringDateMap['big bang'] < bar.baz.stringDateMap['now'] and bar.baz.stringDateMap['now'] is not null" OK
+"select foo.string, foo.component, foo.id from org.hibernate.test.Bar foo" OK
+"select elements(baz.components) from org.hibernate.test.Baz baz" OK
+"select bc.name from org.hibernate.test.Baz baz join baz.components bc" OK
+"from org.hibernate.test.Foo foo where foo.integer < 10 order by foo.string" OK
+"from org.hibernate.test.Fee" OK
+"from org.hibernate.test.Holder h join h.otherHolder oh where h.otherHolder.name = 'bar'" OK
+"from org.hibernate.test.Baz baz join baz.fooSet foo join foo.foo.foo foo2 where foo2.string = 'foo'" OK
+"from org.hibernate.test.Baz baz join baz.fooArray foo join foo.foo.foo foo2 where foo2.string = 'foo'" OK
+"from org.hibernate.test.Baz baz join baz.stringDateMap date where index(date) = 'foo'" OK
+"from org.hibernate.test.Baz baz join baz.topGlarchez g where index(g) = 'A'" OK
+"select index(g) from org.hibernate.test.Baz baz join baz.topGlarchez g" OK
+"from org.hibernate.test.Baz baz left join baz.stringSet" OK
+"from org.hibernate.test.Baz baz join baz.stringSet str where str='foo'" OK
+"from org.hibernate.test.Baz baz left join fetch baz.stringSet" OK
+"from org.hibernate.test.Baz baz join baz.stringSet string where string='foo'" OK
+"from org.hibernate.test.Baz baz inner join baz.components comp where comp.name='foo'" OK
+"from org.hibernate.test.Glarch g inner join g.fooComponents comp where comp.fee is not null" OK
+"from org.hibernate.test.Glarch g inner join g.fooComponents comp join comp.fee fee where fee.count > 0" OK
+"from org.hibernate.test.Glarch g inner join g.fooComponents comp where comp.fee.count is not null" OK
+"from org.hibernate.test.Baz baz left join fetch baz.fooBag" OK
+"from org.hibernate.test.Glarch" OK
+"from org.hibernate.test.Baz baz left join fetch baz.sortablez order by baz.name asc" OK
+"from org.hibernate.test.Baz baz order by baz.name asc" OK
+"from org.hibernate.test.Foo foo, org.hibernate.test.Baz baz left join fetch baz.fees" OK
+"from org.hibernate.test.Foo foo, org.hibernate.test.Bar bar" OK
+"from org.hibernate.test.Foo foo" OK
+"from org.hibernate.test.Foo foo, org.hibernate.test.Bar bar, org.hibernate.test.Bar bar2" OK
+"from org.hibernate.test.X x" OK
+"select distinct foo from org.hibernate.test.Foo foo" OK
+"from org.hibernate.test.Glarch g where g.multiple.glarch=g and g.multiple.count=12" OK
+"from org.hibernate.test.Bar bar left join bar.baz baz left join baz.cascadingBars b where bar.name like 'Bar %'" OK
+"select bar, b from org.hibernate.test.Bar bar left join bar.baz baz left join baz.cascadingBars b where bar.name like 'Bar%'" OK
+"select bar, b from org.hibernate.test.Bar bar left join bar.baz baz left join baz.cascadingBars b where ( bar.name in (:nameList0_, :nameList1_, :nameList2_) or bar.name in (:nameList0_, :nameList1_, :nameList2_) ) and bar.string = :stringVal" OK
+"select bar, b from org.hibernate.test.Bar bar inner join bar.baz baz inner join baz.cascadingBars b where bar.name like 'Bar%'" OK
+"select bar, b from org.hibernate.test.Bar bar left join bar.baz baz left join baz.cascadingBars b where bar.name like :name and b.name like :name" OK
+"select bar from org.hibernate.test.Bar as bar where bar.x > ? or bar.short = 1 or bar.string = 'ff ? bb'" OK
+"select bar from org.hibernate.test.Bar as bar where bar.string = ' ? ' or bar.string = '?'" OK
+"from org.hibernate.test.Baz baz, baz.fooArray foo" OK
+"from s in class org.hibernate.test.Stuff where s.foo.id = ? and s.id.id = ? and s.moreStuff.id.intId = ? and s.moreStuff.id.stringId = ?" OK
+"from s in class org.hibernate.test.Stuff where s.foo.id = ? and s.id.id = ? and s.moreStuff.name = ?" OK
+"from s in class org.hibernate.test.Stuff where s.foo.string is not null" OK
+"from s in class org.hibernate.test.Stuff where s.foo > '0' order by s.foo" OK
+"from ms in class org.hibernate.test.MoreStuff" OK
+"from fee in class org.hibernate.test.Fee" OK
+"select new Result(foo.string, foo.long, foo.integer) from foo in class org.hibernate.test.Foo" OK
+"select new Result( baz.name, foo.long, count(elements(baz.fooArray)) ) from org.hibernate.test.Baz baz join baz.fooArray foo group by baz.name, foo.long" OK
+"select new Result( baz.name, max(foo.long), count(foo) ) from org.hibernate.test.Baz baz join baz.fooArray foo group by baz.name" OK
+"select max( elements(bar.baz.fooArray) ) from org.hibernate.test.Bar as bar" OK
+"from org.hibernate.test.Baz baz left join baz.fooToGlarch join fetch baz.fooArray foo left join fetch foo.foo" OK
+"select baz.name from org.hibernate.test.Bar bar inner join bar.baz baz inner join baz.fooSet foo where baz.name = bar.string" OK
+"SELECT baz.name FROM org.hibernate.test.Bar AS bar INNER JOIN bar.baz AS baz INNER JOIN baz.fooSet AS foo WHERE baz.name = bar.string" OK
+"select baz.name from org.hibernate.test.Bar bar join bar.baz baz left outer join baz.fooSet foo where baz.name = bar.string" OK
+"select baz.name from org.hibernate.test.Bar bar, bar.baz baz, baz.fooSet foo where baz.name = bar.string" OK
+"SELECT baz.name FROM org.hibernate.test.Bar AS bar, bar.baz AS baz, baz.fooSet AS foo WHERE baz.name = bar.string" OK
+"select baz.name from org.hibernate.test.Bar bar left join bar.baz baz left join baz.fooSet foo where baz.name = bar.string" OK
+"select foo.string from org.hibernate.test.Bar bar left join bar.baz.fooSet foo where bar.string = foo.string" OK
+"select baz.name from org.hibernate.test.Bar bar left join bar.baz baz left join baz.fooArray foo where baz.name = bar.string" OK
+"select foo.string from org.hibernate.test.Bar bar left join bar.baz.fooArray foo where bar.string = foo.string" OK
+"select foo from bar in class org.hibernate.test.Bar inner join bar.baz as baz inner join baz.fooSet as foo" OK
+"select foo from bar in class org.hibernate.test.Bar inner join bar.baz.fooSet as foo" OK
+"select foo from bar in class org.hibernate.test.Bar, bar.baz as baz, baz.fooSet as foo" OK
+"select foo from bar in class org.hibernate.test.Bar, bar.baz.fooSet as foo" OK
+"from org.hibernate.test.Bar bar join bar.baz.fooArray foo" OK
+"from bar in class org.hibernate.test.Bar, foo in elements( bar.baz.fooArray )" OK
+"select one.id, elements(one.manies) from one in class org.hibernate.test.One" OK
+"select max( elements(one.manies) ) from one in class org.hibernate.test.One" OK
+"select one, elements(one.manies) from one in class org.hibernate.test.One" OK
+"select one, max(elements(one.manies)) from one in class org.hibernate.test.One group by one" OK
+"select elements(baz.fooArray) from baz in class org.hibernate.test.Baz where baz.id=?" OK
+"select indices(baz.fooArray) from baz in class org.hibernate.test.Baz where baz.id=?" OK
+"select baz, max(elements(baz.timeArray)) from baz in class org.hibernate.test.Baz group by baz" OK
+"select baz, baz.stringSet.size, count(distinct elements(baz.stringSet)), max(elements(baz.stringSet)) from baz in class org.hibernate.test.Baz group by baz" OK
+"select max( elements(baz.timeArray) ) from baz in class org.hibernate.test.Baz where baz.id=?" OK
+"select max(elements(baz.stringSet)) from baz in class org.hibernate.test.Baz where baz.id=?" OK
+"select size(baz.stringSet) from baz in class org.hibernate.test.Baz where baz.id=?" OK
+"from org.hibernate.test.Foo foo where foo.component.glarch.id is not null" OK
+"from baz in class org.hibernate.test.Baz" OK
+"select elements(baz.stringArray) from baz in class org.hibernate.test.Baz" OK
+"select elements(baz.stringList) from baz in class org.hibernate.test.Baz" OK
+"select count(*) from org.hibernate.test.Bar" OK
+"select count(*) from b in class org.hibernate.test.Bar" OK
+"from g in class org.hibernate.test.Glarch" OK
+"select baz, baz from baz in class org.hibernate.test.Baz" OK
+"select baz from baz in class org.hibernate.test.Baz order by baz" OK
+"from bar in class org.hibernate.test.Bar" OK
+"from f in class org.hibernate.test.Foo" OK
+"from q in class org.hibernate.test.Qux" OK
+"select foo from foo in class org.hibernate.test.Foo where foo.string='foo bar'" OK
+"from foo in class org.hibernate.test.Foo order by foo.string, foo.date" OK
+"from foo in class org.hibernate.test.Foo where foo.class='B'" OK
+"from foo in class org.hibernate.test.Foo where foo.class=Bar" OK
+"select bar from bar in class org.hibernate.test.Bar, foo in class org.hibernate.test.Foo where bar.string = foo.string and not bar=foo" OK
+"from foo in class org.hibernate.test.Foo where foo.string='foo bar'" OK
+"select foo from foo in class org.hibernate.test.Foo" OK
+"from bar in class org.hibernate.test.Bar where bar.barString='bar bar'" OK
+"from t in class org.hibernate.test.Trivial" OK
+"from foo in class org.hibernate.test.Foo where foo.date = ?" OK
+"from q in class org.hibernate.test.Qux where q.stuff is null" OK
+"from q in class org.hibernate.test.Qux where q.stuff=?" OK
+"from g in class org.hibernate.test.Glarch where g.version=2" OK
+"from g in class org.hibernate.test.Glarch where g.next is not null" OK
+"from g in class org.hibernate.test.Glarch order by g.order asc" OK
+"from foo in class org.hibernate.test.Foo order by foo.string asc" OK
+"select parent, child from parent in class org.hibernate.test.Foo, child in class org.hibernate.test.Foo where parent.foo = child" OK
+"select count(distinct child.id), count(distinct parent.id) from parent in class org.hibernate.test.Foo, child in class org.hibernate.test.Foo where parent.foo = child" OK
+"select child.id, parent.id, child.long from parent in class org.hibernate.test.Foo, child in class org.hibernate.test.Foo where parent.foo = child" OK
+"select child.id, parent.id, child.long, child, parent.foo from parent in class org.hibernate.test.Foo, child in class org.hibernate.test.Foo where parent.foo = child" OK
+"select parent, child from parent in class org.hibernate.test.Foo, child in class org.hibernate.test.Foo where parent.foo = child and parent.string='a string'" OK
+"from org.hibernate.test.Foo foo where foo.custom.s1 = 'one'" OK
+"from im in class org.hibernate.test.Immutable where im = ?" OK
+"from foo in class org.hibernate.test.Foo where foo.char='X'" OK
+"select distinct elements(baz.stringArray) from baz in class org.hibernate.test.Baz" OK
+"select elements(baz.fooArray) from baz in class org.hibernate.test.Baz" OK
+"from foo in class org.hibernate.test.Fo" OK
+"from foo in class org.hibernate.test.Foo where foo.dependent.qux.foo.string = 'foo2'" OK
+"from org.hibernate.test.Bar bar where bar.object.id = ? and bar.object.class = ?" OK
+"select one from org.hibernate.test.One one, org.hibernate.test.Bar bar where bar.object.id = one.id and bar.object.class = 'O'" OK
+"from l in class org.hibernate.test.Location where l.countryCode = 'AU' and l.description='foo bar'" OK
+"from org.hibernate.test.Bar bar" OK
+"From org.hibernate.test.Bar bar" OK
+"From org.hibernate.test.Foo foo" OK
+"select fum.id from fum in class org.hibernate.test.Fum where not fum.fum='FRIEND'" OK
+"from fum in class org.hibernate.test.Fum where not fum.fum='FRIEND'" OK
+"from fo in class org.hibernate.test.Fo where fo.id.string like 'an instance of fo'" OK
+"from org.hibernate.test.Outer o where o.id.detailId = ?" OK
+"from org.hibernate.test.Outer o where o.id.master.id.sup.dudu is not null" OK
+"from org.hibernate.test.Outer o where o.id.master.id.sup.id.akey is not null" OK
+"select o.id.master.id.sup.dudu from org.hibernate.test.Outer o where o.id.master.id.sup.dudu is not null" OK
+"select o.id.master.id.sup.id.akey from org.hibernate.test.Outer o where o.id.master.id.sup.id.akey is not null" OK
+"from org.hibernate.test.Outer o where o.id.master.bla = ''" OK
+"from org.hibernate.test.Outer o where o.id.master.id.one = ''" OK
+"from org.hibernate.test.Inner inn where inn.id.bkey is not null and inn.backOut.id.master.id.sup.id.akey > 'a'" OK
+"from org.hibernate.test.Outer as o left join o.id.master m left join m.id.sup where o.bubu is not null" OK
+"from org.hibernate.test.Outer as o left join o.id.master.id.sup s where o.bubu is not null" OK
+"from org.hibernate.test.Outer as o left join o.id.master m left join o.id.master.id.sup s where o.bubu is not null" OK
+"select fum1.fo from fum1 in class org.hibernate.test.Fum where fum1.fo.fum is not null" OK
+"from fum1 in class org.hibernate.test.Fum where fum1.fo.fum is not null order by fum1.fo.fum" OK
+"select elements(fum1.friends) from fum1 in class org.hibernate.test.Fum" OK
+"from fum1 in class org.hibernate.test.Fum, fr in elements( fum1.friends )" OK
+"select new Jay(eye) from org.hibernate.test.Eye eye" OK
+"from org.hibernate.test.Category cat where cat.name='new foo'" OK
+"from org.hibernate.test.Category cat where cat.name='new sub'" OK
+"from org.hibernate.test.Up up order by up.id2 asc" OK
+"from org.hibernate.test.Down down" OK
+"from org.hibernate.test.Up up" OK
+"from m in class org.hibernate.test.Master" OK
+"from s in class org.hibernate.test.Several" OK
+"from s in class org.hibernate.test.Single" OK
+"from d in class org.hibernate.test.Detail" OK
+"from c in class org.hibernate.test.Category where c.name = org.hibernate.test.Category.ROOT_CATEGORY" OK
+"select c from c in class org.hibernate.test.Container, s in class org.hibernate.test.Simple where c.oneToMany[2] = s" OK
+"select c from c in class org.hibernate.test.Container, s in class org.hibernate.test.Simple where c.manyToMany[2] = s" OK
+"select c from c in class org.hibernate.test.Container, s in class org.hibernate.test.Simple where s = c.oneToMany[2]" OK
+"select c from c in class org.hibernate.test.Container, s in class org.hibernate.test.Simple where s = c.manyToMany[2]" OK
+"select c from c in class org.hibernate.test.Container where c.oneToMany[0].name = 's'" OK
+"select c from c in class org.hibernate.test.Container where c.manyToMany[0].name = 's'" OK
+"select c from c in class org.hibernate.test.Container where 's' = c.oneToMany[2 - 2].name" OK
+"select c from c in class org.hibernate.test.Container where 's' = c.manyToMany[(3+1)/4-1].name" OK
+"select c from c in class org.hibernate.test.Container where c.manyToMany[ maxindex(c.manyToMany) ].count = 2" OK
+"select c from c in class org.hibernate.test.Container where c.oneToMany[ c.manyToMany[0].count ].name = 's'" OK
+"select c from org.hibernate.test.Container c where c.manyToMany[ c.oneToMany[0].count ].name = 's'" OK
+"select count(comp.name) from org.hibernate.test.Container c join c.components comp" OK
+"from org.hibernate.test.Parent p left join fetch p.child" OK
+"from org.hibernate.test.Parent p join p.child c where c.x > 0" OK
+"from org.hibernate.test.Child c join c.parent p where p.x > 0" OK
+"from org.hibernate.test.Child" OK
+"from org.hibernate.test.MoreStuff" OK
+"from org.hibernate.test.Many" OK
+"from org.hibernate.test.Qux" OK
+"from org.hibernate.test.Fumm" OK
+"from org.hibernate.test.Parent" OK
+"from org.hibernate.test.Simple" OK
+"from org.hibernate.test.Part" OK
+"from org.hibernate.test.Baz" OK
+"from org.hibernate.test.Vetoer" OK
+"from org.hibernate.test.Sortable" OK
+"from org.hibernate.test.Contained" OK
+"from org.hibernate.test.Circular" OK
+"from org.hibernate.test.Stuff" OK
+"from org.hibernate.test.Immutable" OK
+"from org.hibernate.test.Container" OK
+"from org.hibernate.test.One" OK
+"from org.hibernate.test.Fo" OK
+"from org.hibernate.test.Glarch" OK
+"from org.hibernate.test.Fum" OK
+"from org.hibernate.test.Glarch g" OK
+"from org.hibernate.test.Baz baz join baz.parts" OK
+"from c in class org.hibernate.test.Child where c.parent.count=66" OK
+"from org.hibernate.test.Parent p join p.child c where p.count=66" OK
+"select c, c.parent from c in class org.hibernate.test.Child order by c.parent.count" OK
+"select c, c.parent from c in class org.hibernate.test.Child where c.parent.count=66 order by c.parent.count" OK
+"select c, c.parent, c.parent.count from c in class org.hibernate.test.Child order by c.parent.count" OK
+"FROM p IN class org.hibernate.test.Parent WHERE p.count = ?" OK
+"select count(*) from org.hibernate.test.Container as c join c.components as ce join ce.simple as s where ce.name='foo'" OK
+"select c, s from org.hibernate.test.Container as c join c.components as ce join ce.simple as s where ce.name='foo'" OK
+"from s in class org.hibernate.test.Simple" OK
+"from m in class org.hibernate.test.Many" OK
+"from c in class org.hibernate.test.Container" OK
+"from o in class org.hibernate.test.Child" OK
+"from o in class org.hibernate.test.Parent" OK
+"from o in class org.hibernate.test.Circular" OK
+"from c in class org.hibernate.test.C2 where 1=1 or 1=1" OK
+"from b in class org.hibernate.test.B" OK
+"from a in class org.hibernate.test.A" OK
+"from org.hibernate.test.E e join e.reverse as b where b.count=1" OK
+"from org.hibernate.test.E e join e.as as b where b.count=1" OK
+"from org.hibernate.test.B" OK
+"from org.hibernate.test.C1" OK
+"from org.hibernate.test.C2" OK
+"from org.hibernate.test.E e, org.hibernate.test.A a where e.reverse = a.forward and a = ?" OK
+"from org.hibernate.test.E e join fetch e.reverse" OK
+"from org.hibernate.test.E e" OK
+"select max(s.count) from s in class org.hibernate.test.Simple" OK
+"select new org.hibernate.test.S(s.count, s.address) from s in class org.hibernate.test.Simple" OK
+"select count(*) from s in class org.hibernate.test.Simple" OK
+"from s in class org.hibernate.test.Simple where s.name=:name and s.count=:count" OK
+"from s in class org.hibernate.test.Simple where s.name in (:several0_, :several1_)" OK
+"from s in class org.hibernate.test.Simple where s.name in (:stuff0_, :stuff1_)" OK
+"from org.hibernate.test.Simple s where s.name=?" OK
+"from org.hibernate.test.Simple s where s.name=:name" OK
+"from s in class org.hibernate.test.Simple where upper( s.name ) ='SIMPLE 1'" OK
+"from s in class org.hibernate.test.Simple where not( upper( s.name ) ='yada' or 1=2 or 'foo'='bar' or not('foo'='foo') or 'foo' like 'bar' )" OK
+"from s in class org.hibernate.test.Simple where lower( s.name || ' foo' ) ='simple 1 foo'" OK
+"from s in class org.hibernate.test.Simple where upper( s.other.name ) ='SIMPLE 2'" OK
+"from s in class org.hibernate.test.Simple where not ( upper( s.other.name ) ='SIMPLE 2' )" OK
+"select distinct s from s in class org.hibernate.test.Simple where ( ( s.other.count + 3 ) = (15*2)/2 and s.count = 69) or ( ( s.other.count + 2 ) / 7 ) = 2" OK
+"select s from s in class org.hibernate.test.Simple where ( ( s.other.count + 3 ) = (15*2)/2 and s.count = 69) or ( ( s.other.count + 2 ) / 7 ) = 2 order by s.other.count" OK
+"select sum(s.count) from s in class org.hibernate.test.Simple group by s.count having sum(s.count) > 10" OK
+"select s.count from s in class org.hibernate.test.Simple group by s.count having s.count = 12" OK
+"select s.id, s.count, count(t), max(t.date) from s in class org.hibernate.test.Simple, t in class org.hibernate.test.Simple where s.count = t.count group by s.id, s.count order by s.count" OK
+"from s in class org.hibernate.test.Simple where s.name = ?" OK
+"from s in class org.hibernate.test.Simple where s.name = ? and upper(s.name) = ?" OK
+"from s in class org.hibernate.test.Simple where s.name = :foo and upper(s.name) = :bar or s.count=:count or s.count=:count + 1" OK
+"select s.id from s in class org.hibernate.test.Simple" OK
+"select all s, s.other from s in class org.hibernate.test.Simple where s = :s" OK
+"from s in class org.hibernate.test.Simple where s.name in (:name_list0_, :name_list1_) and s.count > :count" OK
+"from org.hibernate.test.Simple s" OK
+"from org.hibernate.test.Assignable" OK
+"from org.hibernate.test.Category" OK
+"from org.hibernate.test.A" OK
+"from foo in class org.hibernate.test.Foo where foo.string=?" OK
+"from foo in class org.hibernate.test.Foo" OK
+"from org.hibernate.test.Po po, org.hibernate.test.Lower low where low.mypo = po" OK
+"from org.hibernate.test.Po po join po.set as sm where sm.amount > 0" OK
+"from org.hibernate.test.Po po join po.top as low where low.foo = 'po'" OK
+"from org.hibernate.test.SubMulti sm join sm.children smc where smc.name > 'a'" OK
+"select s, ya from org.hibernate.test.Lower s join s.yetanother ya" OK
+"from org.hibernate.test.Lower s1 join s1.bag s2" OK
+"from org.hibernate.test.Lower s1 left join s1.bag s2" OK
+"select s, a from org.hibernate.test.Lower s join s.another a" OK
+"select s, a from org.hibernate.test.Lower s left join s.another a" OK
+"from org.hibernate.test.Top s, org.hibernate.test.Lower ls" OK
+"from org.hibernate.test.Lower ls join ls.set s where s.name > 'a'" OK
+"from org.hibernate.test.Po po join po.list sm where sm.name > 'a'" OK
+"from org.hibernate.test.Lower ls inner join ls.another s where s.name is not null" OK
+"from org.hibernate.test.Lower ls where ls.other.another.name is not null" OK
+"from org.hibernate.test.Multi m where m.derived like 'F%'" OK
+"from org.hibernate.test.SubMulti m where m.derived like 'F%'" OK
+"select s from org.hibernate.test.SubMulti as sm join sm.children as s where s.amount>-1 and s.name is null" OK
+"select elements(sm.children) from org.hibernate.test.SubMulti as sm" OK
+"select distinct sm from org.hibernate.test.SubMulti as sm join sm.children as s where s.amount>-1 and s.name is null" OK
+"select distinct s from s in class org.hibernate.test.SubMulti where s.moreChildren[1].amount < 1.0" OK
+"from s in class org.hibernate.test.TrivialClass where s.id = 2" OK
+"select s.count from s in class org.hibernate.test.Top" OK
+"from s in class org.hibernate.test.Lower where s.another.name='name'" OK
+"from s in class org.hibernate.test.Lower where s.yetanother.name='name'" OK
+"from s in class org.hibernate.test.Lower where s.yetanother.name='name' and s.yetanother.foo is null" OK
+"from s in class org.hibernate.test.Top where s.count=1" OK
+"select s.count from s in class org.hibernate.test.Top, ls in class org.hibernate.test.Lower where ls.another=s" OK
+"select elements(ls.bag), elements(ls.set) from ls in class org.hibernate.test.Lower" OK
+"from s in class org.hibernate.test.Lower" OK
+"from s in class org.hibernate.test.Top" OK
+"from sm in class org.hibernate.test.SubMulti" OK
+"select s from s in class org.hibernate.test.Top where s.count>0" OK
+"from m in class org.hibernate.test.Multi where m.count>0 and m.extraProp is not null" OK
+"from m in class org.hibernate.test.Top where m.count>0 and m.name is not null" OK
+"from m in class org.hibernate.test.Lower where m.other is not null" OK
+"from m in class org.hibernate.test.Multi where m.other.id = 1" OK
+"from m in class org.hibernate.test.SubMulti where m.amount > 0.0" OK
+"from m in class org.hibernate.test.Multi" OK
+"from m in class org.hibernate.test.Multi where m.class = SubMulti" OK
+"from m in class org.hibernate.test.Top where m.class = Multi" OK
+"from ls in class org.hibernate.test.Lower" OK
+"from ls in class org.hibernate.test.Lower, s in elements(ls.bag) where s.id is not null" OK
+"from ls in class org.hibernate.test.Lower, s in elements(ls.set) where s.id is not null" OK
+"from o in class org.hibernate.test.Top" OK
+"from o in class org.hibernate.test.Po" OK
+"from ChildMap cm where cm.parent is not null" OK
+"from ParentMap cm where cm.child is not null" OK
+"from org.hibernate.test.Componentizable" OK
+//testUnnamedParameter
+"select foo, bar from org.hibernate.test.Foo foo left outer join foo.foo bar where foo = ?" OK
+//testInElements
+"from bar in class org.hibernate.test.Bar, foo in elements(bar.baz.fooArray)" OK
+"from org.hibernate.test.Bar bar, foo in elements(bar.baz.fooArray)" OK
+//testDotElements
+"select distinct foo from baz in class org.hibernate.test.Baz, foo in elements(baz.fooArray)" OK
+"select foo from baz in class org.hibernate.test.Baz, foo in elements(baz.fooSet)" OK
+"select foo from baz in class org.hibernate.test.Baz, foo in elements(baz.fooArray)" OK
+"from org.hibernate.test.Baz baz where 'b' in elements(baz.collectionComponent.nested.foos) and 1.0 in elements(baz.collectionComponent.nested.floats)" OK
+//testNot
+"from eg.Cat cat where not ( cat.kittens.size < 1 )" OK
+"from eg.Cat cat where not ( cat.kittens.size > 1 )" OK
+"from eg.Cat cat where not ( cat.kittens.size >= 1 )" OK
+"from eg.Cat cat where not ( cat.kittens.size <= 1 )" OK
+"from eg.DomesticCat cat where not ( cat.name between 'A' and 'B' )" OK
+"from eg.DomesticCat cat where not ( cat.name not between 'A' and 'B' )" OK
+"from eg.Cat cat where not ( not cat.kittens.size <= 1 )" OK
+"from eg.Cat cat where not not ( not cat.kittens.size <= 1 )" OK
+//testOtherSyntax
+"select bar from org.hibernate.test.Bar bar order by ((bar.x - :valueX)*(bar.x - :valueX))" OK
+"from bar in class org.hibernate.test.Bar, foo in elements(bar.baz.fooSet)" OK
+"from one in class org.hibernate.test.One, many in elements(one.manies) where one.id = 1 and many.id = 1" OK
+"from org.hibernate.test.Inner _inner join _inner.middles middle" OK
+"FROM m IN class org.hibernate.test.Master WHERE NOT EXISTS ( FROM d IN elements(m.details) WHERE NOT d.i=5 )" OK
+"FROM m IN class org.hibernate.test.Master WHERE NOT 5 IN ( SELECT d.i FROM d IN elements(m.details) )" OK
+"SELECT m FROM m IN class org.hibernate.test.Master, d IN elements(m.details) WHERE d.i=5" OK
+"SELECT m.id FROM m IN class org.hibernate.test.Master, d IN elements(m.details) WHERE d.i=5" OK
+//I'm not sure about these... [jsd]
+//"select bar.string, foo.string from bar in class org.hibernate.test.Bar inner join bar.baz as baz inner join elements(baz.fooSet) as foo where baz.name = 'name'" OK
+//"select bar.string, foo.string from bar in class org.hibernate.test.Bar, bar.baz as baz, elements(baz.fooSet) as foo where baz.name = 'name'" OK
+//"select count(*) where this.amount>-1 and this.name is null" OK
+//"from sm in class org.hibernate.test.SubMulti where exists sm.children.elements" OK
+//testEjbqlExtensions
+"select object(a) from Animal a where a.mother member of a.offspring" OK
+"select object(a) from Animal a where a.offspring is empty" OK
+//testHB1042
+"select x from fmc_web.pool.Pool x left join x.containers c0 where (upper(x.name) = upper(':') and c0.id = 1)" OK
+//testKeywordInPath
+"from Customer c where c.order.status = 'argh'" OK
+"from Customer c where c.order.count > 3" OK
+"select c.where from Customer c where c.order.count > 3" OK
+"from Interval i where i.end <:end" OK
+"from Letter l where l.case = :case" OK
+//testPathologicalKeywordAsIdentifier
+"from Order order" OK
+"from Order order join order.group" OK
+"from X x order by x.group.by.from" OK
+"from Order x order by x.order.group.by.from" OK
+"select order.id from Order order" OK
+"select order from Order order" OK
+"from Order order where order.group.by.from is not null" OK
+"from Order order order by order.group.by.from" OK
+"from Group as group group by group.by.from" OK
+//testHHH354
+"from Foo f where f.full = 'yep'" OK
+//testWhereAsIdentifier
+"from where.Order" OK
+//testConstructorIn
+"from org.hibernate.test.Bar bar where (b.x, b.y, b.z) in (select foo, bar, baz from org.hibernate.test.Foo)" OK
+//testMultiByteCharacters
+"from User user where user.name like '%nn\u4e2dnn%'" OK
+//FIXME "from User user where user.\u432d like '%\u4e2d%'" OK
+//FIXME "from \u432d \u432d where \u432d.name like '%fred%'" OK
+//testHHH719
+"from Foo f order by com.fooco.SpecialFunction(f.id)" OK
+//testHHH1107
+"from Animal where zoo.address.street = '123 Bogus St.'" OK
+//testHHH1247
+"select distinct user.party from com.itf.iceclaims.domain.party.user.UserImpl user inner join user.party.$RelatedWorkgroups relatedWorkgroups where relatedWorkgroups.workgroup.id = :workgroup and relatedWorkgroups.effectiveTime.start <= :datesnow and relatedWorkgroups.effectiveTime.end > :dateenow " OK
+//testLineAndColumnNumber
+"from Foo f where f.name = 'fred'" OK
+//
+"from Animal a where a.bodyWeight = ?1" OK
+"select object(m) from Model m" OK
+"select o from Animal a inner join a.offspring o" OK
+"select object(o) from Animal a, in(a.offspring) o" OK
+"from Animal a where not exists elements(a.offspring)" OK
+"from Animal a where exists (from a.mother.father.offspring)" OK
+"select object(a) from Animal a where a.mother.father.offspring is not empty" OK
+"from Animal a where a.mother in (from a.offspring)" OK
+"from Animal a where a.mother not in (from a.offspring)" OK
+"select object(a) from Animal a where a.mother not member of a.offspring" OK
+"select object(a) from Animal a where a.description = concat('1', concat('2','3'), '4'||'5')||0" OK
+"from Animal a where substring(a.description, 1, 3) = :p1" OK
+"select substring(a.description, 1, 3) from Animal a" OK
+"from Animal a where lower(a.description) = :p1" OK
+"from Animal a where upper(a.description) = :p1" OK
+"from Animal a where length(a.description) = :p1" OK
+"select length(a.description) from Animal a" OK
+"from Animal a where locate(a.description, 'abc', 2) = :p1" OK
+"select locate(a.description, :p1, 2) from Animal a" OK
+"select object(a) from Animal a where trim(trailing '_' from a.description) = :p1" OK
+"select trim(trailing '_' from a.description) from Animal a" OK
+"select object(a) from Animal a where trim(leading '_' from a.description) = :p1" OK
+"select object(a) from Animal a where trim(a.description) = :p1" OK
+"select object(a) from Animal a where abs(a.bodyWeight) = sqrt(a.bodyWeight)" OK
+"select object(a) from Animal a where mod(a.bodyWeight, a.mother.bodyWeight) = :p1" OK
+"select object(a) from Animal a where BIT_LENGTH(a.bodyWeight) = :p1" OK
+"select BIT_LENGTH(a.bodyWeight) from Animal a" OK
+"select object(a) from Animal a where CURRENT_DATE = :p1 or CURRENT_TIME = :p2 or CURRENT_TIMESTAMP = :p3" OK
+"select object(a) from Animal a where a.bodyWeight like '%a%'" OK
+"select object(a) from Animal a where a.bodyWeight not like '%a%'" OK
+"select object(a) from Animal a where a.bodyWeight like '%a%' escape '%'" OK
+"from Human h where h.pregnant = true" OK
+"from Human h where h.pregnant = false" OK
+"from Human h where not( h.pregnant=true )" OK
+"select CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP from Animal a" OK
+"select p.name, a.zipCode, count(*) from Person p left outer join Employee e on e.id = p.id and p.type = 'E' and (e.effective>? or e.effective<?) join Address a on a.pid = p.id where upper(p.name) like 'G%' and p.age > 100 and (p.sex = 'M' or p.sex = 'F') and coalesce( trim(a.street), a.city, (a.zip) ) is not null order by p.name asc, a.zipCode asc" OK
+"select ( (m.age - p.age) * 12 ), trim(upper(p.name)) from Person p, Person m where p.mother = m.id and ( p.age = (select max(p0.age) from Person p0 where (p0.mother=m.id)) and p.name like ? )" OK
+"select case when p.age > 50 then 'old' when p.age > 18 then 'adult' else 'child' end from Person p where ( case when p.age > 50 then 'old' when p.age > 18 then 'adult' else 'child' end ) like ?" OK
+//HQLTest.testInvalidCollectionDereferencesFail
+"from Animal a where a.offspring.description = 'xyz'" OK
+"from Animal a where a.offspring.father.description = 'xyz'" OK
+//HQLTest.testSubComponentReferences
+"select c.address.zip.code from ComponentContainer c" OK
+"select c.address.zip from ComponentContainer c" OK
+"select c.address from ComponentContainer c" OK
+//HQLTest.testManyToAnyReferences
+"from PropertySet p where p.someSpecificProperty.id is not null" OK
+"from PropertySet p join p.generalProperties gp where gp.id is not null" OK
+//HQLTest.testCollectionJoinsInSubselect
+"select a.id, a.description from Animal a left join a.offspring where a in ( select a1 from Animal a1 left join a1.offspring o where a1.id=1)" OK
+"select h.id, h.description from Human h left join h.friends where h in ( select h1 from Human h1 left join h1.friends f where h1.id=1 )" OK
+//HQLTest.testEmptyInListFailureExpected
+"select o.orderDate - o.orderDate from Order o" OK
+//HQLTest.testDateTimeArithmeticReturnTypesAndParameterGuessing
+"select o.orderDate + 2 from Order o" OK
+"select o.orderDate -2 from Order o" OK
+"from Order o where o.orderDate > ?" OK
+"select o.orderDate + ? from Order o" OK
+//HQLTest.testReturnMetadata
+"select a as animal from Animal a" OK
+"select o as entity from java.lang.Object o" OK
+//HQLTest.testImplicitJoinsAlongWithCartesianProduct
+"select foo.foo from Foo foo, Foo foo2" OK
+"select foo.foo.foo from Foo foo, Foo foo2" OK
+//HQLTest.testSubselectBetween
+"from Animal x where (select max(a.bodyWeight) from Animal a) between :min and :max" OK
+"from Animal x where (select max(a.description) from Animal a) like 'big%'" OK
+"from Animal x where (select max(a.bodyWeight) from Animal a) is not null" OK
+"from Animal x where exists (select max(a.bodyWeight) from Animal a)" OK
+"from Animal x where (select max(a.bodyWeight) from Animal a) in (1,2,3)" OK
+//HQLTest.testFetchOrderBy
+"from Animal a left outer join fetch a.offspring where a.mother.id = :mid order by a.description" OK
+//HQLTest.testCollectionOrderBy
+"from Animal a join a.offspring o order by a.description" OK
+"from Animal a join fetch a.offspring order by a.description" OK
+"from Animal a join fetch a.offspring o order by o.description" OK
+"from Animal a join a.offspring o order by a.description, o.description" OK
+//HQLTest.testExpressionWithParamInFunction
+"from Animal a where abs(a.bodyWeight-:param) < 2.0" OK
+"from Animal a where abs(:param - a.bodyWeight) < 2.0" OK
+//HQLTest.testCompositeKeysWithPropertyNamedId
+"select e.id.id from EntityWithCrazyCompositeKey e" OK
+"select max(e.id.id) from EntityWithCrazyCompositeKey e" OK
+//HQLTest.testMaxindexHqlFunctionInElementAccessorFailureExpected
+"select c from ContainerX c where c.manyToMany[ maxindex(c.manyToMany) ].count = 2" OK
+"select c from Container c where c.manyToMany[ maxIndex(c.manyToMany) ].count = 2" OK
+//HQLTest.testMultipleElementAccessorOperatorsFailureExpected
+"select c from ContainerX c where c.oneToMany[ c.manyToMany[0].count ].name = 's'" OK
+//HQLTest.testKeyManyToOneJoinFailureExpected
+"from Order o left join fetch o.lineItems li left join fetch li.product p" OK
+"from Outer o where o.id.master.id.sup.dudu is not null" OK
+//HQLTest.testDuplicateExplicitJoinFailureExpected
+"from Animal a join a.mother m1 join a.mother m2" OK
+"from Zoo zoo join zoo.animals an join zoo.mammals m" OK
+"from Zoo zoo join zoo.mammals an join zoo.mammals m" OK
+//HQLTest.testIndexWithExplicitJoin
+"from Zoo zoo join zoo.animals an where zoo.mammals[ index(an) ] = an" OK
+"from Zoo zoo join zoo.mammals dog where zoo.mammals[ index(dog) ] = dog" OK
+"from Zoo zoo join zoo.mammals dog where dog = zoo.mammals[ index(dog) ]" OK
+//HQLTest.testOneToManyMapIndex
+"from Zoo zoo where zoo.mammals['dog'].description like '%black%'" OK
+"from Zoo zoo where zoo.mammals['dog'].father.description like '%black%'" OK
+"from Zoo zoo where zoo.mammals['dog'].father.id = 1234" OK
+"from Zoo zoo where zoo.animals['1234'].description like '%black%'" OK
+//HQLTest.testExplicitJoinMapIndex
+"from Zoo zoo, Dog dog where zoo.mammals['dog'] = dog" OK
+"from Zoo zoo join zoo.mammals dog where zoo.mammals['dog'] = dog" OK
+//HQLTest.testIndexFunction
+"from Zoo zoo join zoo.mammals dog where index(dog) = 'dog'" OK
+"from Zoo zoo join zoo.animals an where index(an) = '1234'" OK
+//HQLTest.testSelectCollectionOfValues
+"select baz, date from Baz baz join baz.stringDateMap date where index(date) = 'foo'" OK
+//HQLTest.testCollectionOfValues
+"from Baz baz join baz.stringDateMap date where index(date) = 'foo'" OK
+//HQLTest.testHHH719
+"from Baz b order by org.bazco.SpecialFunction(b.id)" OK
+"from Baz b order by anypackage.anyFunction(b.id)" OK
+//HQLTest.testParameterListExpansion
+"from Animal as animal where animal.id in (:idList_1, :idList_2)" OK
+//HQLTest.testComponentManyToOneDereferenceShortcut
+"from Zoo z where z.address.stateProvince.id is null" OK
+//HQLTest.testNestedCollectionImplicitJoins
+"select h.friends.offspring from Human h" OK
+//HQLTest.testExplicitJoinsInSubquery
+"from org.hibernate.test.hql.Animal as animal where animal.id in ( select a.id from org.hibernate.test.hql.Animal as a left join a.mother as mo )" OK
+//HQLTest.testImplicitJoinsInGroupBy
+"select o.mother.bodyWeight, count(distinct o) from Animal an join an.offspring as o group by o.mother.bodyWeight" OK
+//HQLTest.testCrazyIdFieldNames
+"select e.heresAnotherCrazyIdFieldName from MoreCrazyIdFieldNameStuffEntity e where e.heresAnotherCrazyIdFieldName is not null" OK
+"select e.heresAnotherCrazyIdFieldName.heresAnotherCrazyIdFieldName from MoreCrazyIdFieldNameStuffEntity e where e.heresAnotherCrazyIdFieldName is not null" OK
+//HQLTest.testSizeFunctionAndProperty
+"from Animal a where a.offspring.size > 0" OK
+"from Animal a join a.offspring where a.offspring.size > 1" OK
+"from Animal a where size(a.offspring) > 0" OK
+"from Animal a join a.offspring o where size(a.offspring) > 1" OK
+"from Animal a where size(a.offspring) > 1 and size(a.offspring) < 100" OK
+"from Human a where a.family.size > 0" OK
+"from Human a join a.family where a.family.size > 1" OK
+"from Human a where size(a.family) > 0" OK
+"from Human a join a.family o where size(a.family) > 1" OK
+"from Human a where a.family.size > 0 and a.family.size < 100" OK
+//HQLTest.testFromOnly
+"from Animal" OK
+"from Model" OK
+//HQLTest.testJoinPathEndingInValueCollection
+"select h from Human as h join h.nickNames as nn where h.nickName=:nn1 and (nn=:nn2 or nn=:nn3)" OK
+//HQLTest.testSerialJoinPathEndingInValueCollection
+"select h from Human as h join h.friends as f join f.nickNames as nn where h.nickName=:nn1 and (nn=:nn2 or nn=:nn3)" OK
+//HQLTest.testImplicitJoinContainedByCollectionFunction
+"from Human as h where 'shipping' in indices(h.father.addresses)" OK
+"from Human as h where 'shipping' in indices(h.father.father.addresses)" OK
+"from Human as h where 'sparky' in elements(h.father.nickNames)" OK
+"from Human as h where 'sparky' in elements(h.father.father.nickNames)" OK
+//HQLTest.testImpliedJoinInSubselectFrom
+"from Animal a where exists( from a.mother.offspring )" OK
+//HQLTest.testSubselectImplicitJoins
+"from Simple s where s = some( select sim from Simple sim where sim.other.count=s.other.count )" OK
+//HQLTest.testCollectionOfValuesSize
+"select size(baz.stringDateMap) from org.hibernate.test.legacy.Baz baz" OK
+//HQLTest.testCollectionFunctions
+"from Zoo zoo where size(zoo.animals) > 100" OK
+"from Zoo zoo where maxindex(zoo.mammals) = 'dog'" OK
+//HQLTest.testImplicitJoinInExplicitJoin
+"from Animal an inner join an.mother.mother gm" OK
+"from Animal an inner join an.mother.mother.mother ggm" OK
+"from Animal an inner join an.mother.mother.mother.mother gggm" OK
+//HQLTest.testImpliedManyToManyProperty
+"select c from ContainerX c where c.manyToMany[0].name = 's'" OK
+"select size(zoo.animals) from Zoo zoo" OK
+//HQLTest.testCollectionIndexFunctionsInSelect" OK
+"select maxindex(zoo.animals) from Zoo zoo" OK
+"select minindex(zoo.animals) from Zoo zoo" OK
+"select indices(zoo.animals) from Zoo zoo" OK
+//HQLTest.testCollectionElementFunctionsInSelect
+"select maxelement(zoo.animals) from Zoo zoo" OK
+"select minelement(zoo.animals) from Zoo zoo" OK
+"select elements(zoo.animals) from Zoo zoo" OK
+//HQLTest.testFetchCollectionOfValues
+"from Baz baz left join fetch baz.stringSet" OK
+//HQLTest.testFetchList
+"from User u join fetch u.permissions" OK
+//HQLTest.testCollectionFetchWithExplicitThetaJoin
+"select m from Master m1, Master m left join fetch m.details where m.name=m1.name" OK
+//HQLTest.testListElementFunctionInSelect
+"select maxelement(u.permissions) from User u" OK
+"select elements(u.permissions) from User u" OK
+//HQLTest.testListElementFunctionInWhere
+"from User u where 'read' in elements(u.permissions)" OK
+"from User u where 'write' <> all elements(u.permissions)" OK
+//HQLTest.testManyToManyElementFunctionInSelect
+"select maxelement(human.friends) from Human human" OK
+"select elements(human.friends) from Human human" OK
+//HQLTest.testManyToManyMaxElementFunctionInWhere
+"from Human human where 5 = maxelement(human.friends)" OK
+//HQLTest.testCollectionIndexFunctionsInWhere
+"from Zoo zoo where 4 = maxindex(zoo.animals)" OK
+"from Zoo zoo where 2 = minindex(zoo.animals)" OK
+//HQLTest.testCollectionIndicesInWhere
+"from Zoo zoo where 4 > some indices(zoo.animals)" OK
+"from Zoo zoo where 4 > all indices(zoo.animals)" OK
+//HQLTest.testIndicesInWhere
+"from Zoo zoo where 4 in indices(zoo.animals)" OK
+"from Zoo zoo where exists indices(zoo.animals)" OK
+//HQLTest.testCollectionElementInWhere
+"from Zoo zoo where 4 > some elements(zoo.animals)" OK
+"from Zoo zoo where 4 > all elements(zoo.animals)" OK
+//HQLTest.testElementsInWhere
+"from Zoo zoo where 4 in elements(zoo.animals)" OK
+"from Zoo zoo where exists elements(zoo.animals)" OK
+//HQLTest.testNull
+"from Human h where h.nickName is null" OK
+"from Human h where h.nickName is not null" OK
+//HQLTest.testSubstitutions
+"from Human h where h.pregnant = yes" OK
+"from Human h where h.pregnant = foo" OK
+//HQLTest.testEscapedQuote
+"from Human h where h.nickName='1 ov''tha''few'" OK
+//HQLTest.testCaseWhenElse
+"from Human h where case when h.nickName='1ovthafew' then 'Gavin' when h.nickName='turin' then 'Christian' else h.nickName end = h.name.first" OK
+//HQLTest.testCaseExprWhenElse
+"from Human h where case h.nickName when '1ovthafew' then 'Gavin' when 'turin' then 'Christian' else h.nickName end = h.name.first" OK
+//HQLTest.testInvalidHql
+"from Animal foo where an.bodyWeight > 10" OK
+"select an.name from Animal foo" OK
+"from Animal foo where an.verybogus > 10" OK
+"select an.boguspropertyname from Animal foo" OK
+"from NonexistentClass where name='foo'" OK
+"select new FOO_BOGUS_Animal(an.description, an.bodyWeight) from Animal an" OK
+"select new Animal(an.description, an.bodyWeight, 666) from Animal an" OK
+//HQLTest.testWhereBetween
+"from Animal an where an.bodyWeight between 1 and 10" OK
+//HQLTest.testConcatenation
+"from Human h where h.nickName = '1' || 'ov' || 'tha' || 'few'" OK
+//HQLTest.testWhereLike
+"from Animal a where a.description like '%black%'" OK
+"from Animal an where an.description like '%fat%'" OK
+"from Animal an where lower(an.description) like '%fat%'" OK
+//HQLTest.testWhereIn
+"from Animal an where an.description in ('fat', 'skinny')" OK
+//HQLTest.testLiteralInFunction
+"from Animal an where an.bodyWeight > abs(5)" OK
+"from Animal an where an.bodyWeight > abs(-5)" OK
+//HQLTest.testExpressionInFunction
+"from Animal an where an.bodyWeight > abs(3-5)" OK
+"from Animal an where an.bodyWeight > abs(3/5)" OK
+"from Animal an where an.bodyWeight > abs(3+5)" OK
+"from Animal an where an.bodyWeight > abs(3*5)" OK
+//HQLTest.testNotOrWhereClause
+"from Simple s where 'foo'='bar' or not 'foo'='foo'" OK
+"from Simple s where 'foo'='bar' or not ('foo'='foo')" OK
+"from Simple s where not ( 'foo'='bar' or 'foo'='foo' )" OK
+"from Simple s where not ( 'foo'='bar' and 'foo'='foo' )" OK
+"from Simple s where not ( 'foo'='bar' and 'foo'='foo' ) or not ('x'='y')" OK
+"from Simple s where not ( 'foo'='bar' or 'foo'='foo' ) and not ('x'='y')" OK
+"from Simple s where not ( 'foo'='bar' or 'foo'='foo' ) and 'x'='y'" OK
+"from Simple s where not ( 'foo'='bar' and 'foo'='foo' ) or 'x'='y'" OK
+"from Simple s where 'foo'='bar' and 'foo'='foo' or not 'x'='y'" OK
+"from Simple s where 'foo'='bar' or 'foo'='foo' and not 'x'='y'" OK
+"from Simple s where ('foo'='bar' and 'foo'='foo') or 'x'='y'" OK
+"from Simple s where ('foo'='bar' or 'foo'='foo') and 'x'='y'" OK
+"from Simple s where not( upper( s.name ) ='yada' or 1=2 or 'foo'='bar' or not('foo'='foo') or 'foo' like 'bar' )" OK
+//HQLTest.testComplexExpressionInFunction
+"from Animal an where an.bodyWeight > abs((3-5)/4)" OK
+//HQLTest.testStandardFunctions
+"from Animal where current_date = current_time" OK
+"from Animal a where upper(a.description) = 'FAT'" OK
+"select lower(a.description) from Animal a" OK
+//HQLTest.testOrderBy
+"from Animal an order by an.bodyWeight" OK
+"from Animal an order by an.bodyWeight asc" OK
+"from Animal an order by an.bodyWeight desc" OK
+"from Animal an order by sqrt(an.bodyWeight*4)/2" OK
+"from Animal an order by an.mother.bodyWeight" OK
+"from Animal an order by an.bodyWeight, an.description" OK
+"from Animal an order by an.bodyWeight asc, an.description desc" OK
+"from Human h order by sqrt(h.bodyWeight), year(h.birthdate)" OK
+//HQLTest.testGroupByFunction
+"select count(*) from Human h group by year(h.birthdate)" OK
+"select count(*) from Human h group by trunc( sqrt(h.bodyWeight*4)/2 )" OK
+"select count(*) from Human h group by year(sysdate)" OK
+//HQLTest.testPolymorphism
+"from Mammal" OK
+"from Dog" OK
+"from Mammal m where m.pregnant = false and m.bodyWeight > 10" OK
+"from Dog d where d.pregnant = false and d.bodyWeight > 10" OK
+//HQLTest.testProduct
+"from Animal, Animal" OK
+"from Animal x, Animal y where x.bodyWeight = y.bodyWeight" OK
+"from Animal x, Mammal y where x.bodyWeight = y.bodyWeight and not y.pregnant = true" OK
+"from Mammal, Mammal" OK
+//HQLTest.testJoinedSubclassProduct
+"from PettingZoo, PettingZoo" OK
+//HQLTest.testProjectProduct
+"select x from Human x, Human y where x.nickName = y.nickName" OK
+"select x, y from Human x, Human y where x.nickName = y.nickName" OK
+//HQLTest.testExplicitEntityJoins
+"from Animal an inner join an.mother mo" OK
+"from Animal an left outer join an.mother mo" OK
+"from Animal an left outer join fetch an.mother" OK
+//HQLTest.testMultipleExplicitEntityJoins
+"from Animal an inner join an.mother mo inner join mo.mother gm" OK
+"from Animal an left outer join an.mother mo left outer join mo.mother gm" OK
+"from Animal an inner join an.mother m inner join an.father f" OK
+"from Animal an left join fetch an.mother m left join fetch an.father f" OK
+//HQLTest.testMultipleExplicitJoins
+"from Animal an inner join an.mother mo inner join an.offspring os" OK
+"from Animal an left outer join an.mother mo left outer join an.offspring os" OK
+//HQLTest.testExplicitEntityJoinsWithRestriction
+"from Animal an inner join an.mother mo where an.bodyWeight < mo.bodyWeight" OK
+//HQLTest.testIdProperty
+"from Animal a where a.mother.id = 12" OK
+//HQLTest.testSubclassAssociation
+"from DomesticAnimal da join da.owner o where o.nickName = 'Gavin'" OK
+"from DomesticAnimal da left join fetch da.owner" OK
+"from Human h join h.pets p where p.pregnant = 1" OK
+"from Human h join h.pets p where p.bodyWeight > 100" OK
+"from Human h left join fetch h.pets" OK
+//HQLTest.testExplicitCollectionJoins
+"from Animal an inner join an.offspring os" OK
+"from Animal an left outer join an.offspring os" OK
+//HQLTest.testExplicitOuterJoinFetch
+"from Animal an left outer join fetch an.offspring" OK
+//HQLTest.testExplicitOuterJoinFetchWithSelect
+"select an from Animal an left outer join fetch an.offspring" OK
+//HQLTest.testExplicitJoins
+"from Zoo zoo join zoo.mammals mam where mam.pregnant = true and mam.description like '%white%'" OK
+"from Zoo zoo join zoo.animals an where an.description like '%white%'" OK
+//HQLTest.testMultibyteCharacterConstant
+"from Zoo zoo join zoo.animals an where an.description like '%\u4e2d%'" OK
+//HQLTest.testImplicitJoins
+"from Animal an where an.mother.bodyWeight > ?" OK
+"from Animal an where an.mother.bodyWeight > 10" OK
+"from Dog dog where dog.mother.bodyWeight > 10" OK
+"from Animal an where an.mother.mother.bodyWeight > 10" OK
+"from Animal an where an.mother is not null" OK
+"from Animal an where an.mother.id = 123" OK
+//HQLTest.testImplicitJoinInSelect
+"select foo, foo.long from Foo foo" OK
+"select foo.foo from Foo foo" OK
+"select foo, foo.foo from Foo foo" OK
+"select foo.foo from Foo foo where foo.foo is not null" OK
+//HQLTest.testSelectExpressions
+"select an.mother.mother from Animal an" OK
+"select an.mother.mother.mother from Animal an" OK
+"select an.mother.mother.bodyWeight from Animal an" OK
+"select an.mother.zoo.id from Animal an" OK
+"select user.human.zoo.id from User user" OK
+"select u.userName, u.human.name.first from User u" OK
+"select u.human.name.last, u.human.name.first from User u" OK
+"select bar.baz.name from Bar bar" OK
+"select bar.baz.name, bar.baz.count from Bar bar" OK
+//HQLTest.testSelectStandardFunctionsNoParens
+"select current_date, current_time, current_timestamp from Animal" OK
+//HQLTest.testMapIndex
+"from User u where u.permissions['hibernate']='read'" OK
+//HQLTest.testCollectionFunctionsInSelect
+"select baz, size(baz.stringSet), count( distinct elements(baz.stringSet) ), max( elements(baz.stringSet) ) from Baz baz group by baz" OK
+"select elements(fum1.friends) from org.hibernate.test.legacy.Fum fum1" OK
+"select elements(one.manies) from org.hibernate.test.legacy.One one" OK
+//HQLTest.testNamedParameters
+"from Animal an where an.mother.bodyWeight > :weight" OK
+//HQLTest.testClassProperty
+"from Animal a where a.mother.class = Reptile" OK
+//HQLTest.testComponent
+"from Human h where h.name.first = 'Gavin'" OK
+//HQLTest.testSelectEntity
+"select an from Animal an inner join an.mother mo where an.bodyWeight < mo.bodyWeight" OK
+"select mo, an from Animal an inner join an.mother mo where an.bodyWeight < mo.bodyWeight" OK
+//HQLTest.testValueAggregate
+"select max(p), min(p) from User u join u.permissions p" OK
+//HQLTest.testAggregation
+"select count(an) from Animal an" OK
+"select count(distinct an) from Animal an" OK
+"select count(distinct an.id) from Animal an" OK
+"select count(all an.id) from Animal an" OK
+//HQLTest.testSelectProperty
+"select an.bodyWeight, mo.bodyWeight from Animal an inner join an.mother mo where an.bodyWeight < mo.bodyWeight" OK
+//HQLTest.testSelectEntityProperty
+"select an.mother from Animal an" OK
+"select an, an.mother from Animal an" OK
+//HQLTest.testSelectDistinctAll
+"select distinct an.description, an.bodyWeight from Animal an" OK
+"select all an from Animal an" OK
+//HQLTest.testSelectAssociatedEntityId
+"select an.mother.id from Animal an" OK
+//HQLTest.testGroupBy
+"select an.mother.id, max(an.bodyWeight) from Animal an group by an.mother.id having max(an.bodyWeight)>1.0" OK
+//HQLTest.testGroupByMultiple
+"select s.id, s.count, count(t), max(t.date) from org.hibernate.test.legacy.Simple s, org.hibernate.test.legacy.Simple t where s.count = t.count group by s.id, s.count order by s.count" OK
+//HQLTest.testManyToMany
+"from Human h join h.friends f where f.nickName = 'Gavin'" OK
+"from Human h join h.friends f where f.bodyWeight > 100" OK
+//HQLTest.testManyToManyElementFunctionInWhere
+"from Human human where human in elements(human.friends)" OK
+"from Human human where human = some elements(human.friends)" OK
+//HQLTest.testManyToManyElementFunctionInWhere2
+"from Human h1, Human h2 where h2 in elements(h1.family)" OK
+"from Human h1, Human h2 where 'father' in indices(h1.family)" OK
+//HQLTest.testManyToManyFetch
+"from Human h left join fetch h.friends" OK
+//HQLTest.testManyToManyIndexAccessor
+"select c from ContainerX c, Simple s where c.manyToMany[2] = s" OK
+"select s from ContainerX c, Simple s where c.manyToMany[2] = s" OK
+"from ContainerX c, Simple s where c.manyToMany[2] = s" OK
+//HQLTest.testSelectNew
+"select new Animal(an.description, an.bodyWeight) from Animal an" OK
+"select new org.hibernate.test.hql.Animal(an.description, an.bodyWeight) from Animal an" OK
+//HQLTest.testSimpleCorrelatedSubselect
+"from Animal a where a.bodyWeight = (select o.bodyWeight from a.offspring o)" OK
+"from Animal a where a = (from a.offspring o)" OK
+//HQLTest.testSimpleUncorrelatedSubselect
+"from Animal a where a.bodyWeight = (select an.bodyWeight from Animal an)" OK
+"from Animal a where a = (from Animal an)" OK
+//HQLTest.testSimpleCorrelatedSubselect2
+"from Animal a where a = (select o from a.offspring o)" OK
+"from Animal a where a in (select o from a.offspring o)" OK
+//HQLTest.testSimpleUncorrelatedSubselect2
+"from Animal a where a = (select an from Animal an)" OK
+"from Animal a where a in (select an from Animal an)" OK
+//HQLTest.testUncorrelatedSubselect2
+"from Animal a where a.bodyWeight = (select max(an.bodyWeight) from Animal an)" OK
+//HQLTest.testCorrelatedSubselect2
+"from Animal a where a.bodyWeight > (select max(o.bodyWeight) from a.offspring o)" OK
+//HQLTest.testManyToManyJoinInSubselect
+"select foo from Foo foo where foo in (select elt from Baz baz join baz.fooArray elt)" OK
+//HQLTest.testImplicitJoinInSubselect
+"from Animal a where a = (select an.mother from Animal an)" OK
+"from Animal a where a.id = (select an.mother.id from Animal an)" OK
+//HQLTest.testManyToOneSubselect
+"from Animal a where 'foo' in (select m.description from a.mother m)" OK
+//HQLTest.testPositionalParameters
+"from Animal an where an.bodyWeight > ?" OK
+//HQLTest.testKeywordPropertyName
+"from Glarch g order by g.order asc" OK
+"select g.order from Glarch g where g.order = 3" OK
+//HQLTest.testJavaConstant
+"from org.hibernate.test.legacy.Category c where c.name = org.hibernate.test.legacy.Category.ROOT_CATEGORY" OK
+"from org.hibernate.test.legacy.Category c where c.id = org.hibernate.test.legacy.Category.ROOT_ID" OK
+"from Category c where c.name = Category.ROOT_CATEGORY" OK
+"select c.name, Category.ROOT_ID from Category as c" OK
+//HQLTest.testClassName
+"from Zoo zoo where zoo.class = PettingZoo" OK
+"from DomesticAnimal an where an.class = Dog" OK
+//HQLTest.testSelectDialectFunction
+"select mod(s.count, 2) from org.hibernate.test.legacy.Simple as s where s.id = 10" OK
+"select upper(human.name.first) from Human human" OK
+"from Human human where lower(human.name.first) like 'gav%'" OK
+"select max(a.bodyWeight) from Animal a" OK
+//HQLTest.testTwoJoins
+"from Human human join human.friends, Human h join h.mother" OK
+"from Human human join human.friends f, Animal an join an.mother m where f=m" OK
+"from Baz baz left join baz.fooToGlarch, Bar bar join bar.foo" OK
+//HQLTest.testToOneToManyManyJoinSequence
+"from Dog d join d.owner h join h.friends f where f.name.first like 'joe%'" OK
+//HQLTest.testToOneToManyJoinSequence
+"from Animal a join a.mother m join m.offspring" OK
+"from Dog d join d.owner m join m.offspring" OK
+"from Animal a join a.mother m join m.offspring o where o.bodyWeight > a.bodyWeight" OK
+//HQLTest.testSubclassExplicitJoin
+"from DomesticAnimal da join da.owner o where o.nickName = 'gavin'" OK
+"from DomesticAnimal da join da.owner o where o.bodyWeight > 0" OK
+//HQLTest.testMultipleExplicitCollectionJoins
+"from Animal an inner join an.offspring os join os.offspring gc" OK
+"from Animal an left outer join an.offspring os left outer join os.offspring gc" OK
+//HQLTest.testSelectDistinctComposite
+"select distinct p from org.hibernate.test.compositeelement.Parent p join p.children c where c.name like 'Child%'" OK
+//HQLTest.testDotComponent
+"select fum.id from org.hibernate.test.legacy.Fum as fum where not fum.fum='FRIEND'" OK
+//HQLTest.testOrderByCount
+"from Animal an group by an.zoo.id order by an.zoo.id, count(*)" OK
+//HQLTest.testHavingCount
+"from Animal an group by an.zoo.id having count(an.zoo.id) > 1" OK
+//HQLTest.selectWhereElements
+"select foo from Foo foo, Baz baz where foo in elements(baz.fooArray)" OK
+//HQLTest.testCollectionOfComponents
+"from Baz baz inner join baz.components comp where comp.name='foo'" OK
+//HQLTest.testOneToOneJoinedFetch
+"from org.hibernate.test.onetoone.joined.Person p join fetch p.address left join fetch p.mailingAddress" OK
+//HQLTest.testSubclassImplicitJoin
+"from DomesticAnimal da where da.owner.nickName like 'Gavin%'" OK
+"from DomesticAnimal da where da.owner.nickName = 'gavin'" OK
+"from DomesticAnimal da where da.owner.bodyWeight > 0" OK
+//HQLTest.testComponent2
+"from Dog dog where dog.owner.name.first = 'Gavin'" OK
+//HQLTest.testOneToOne
+"from User u where u.human.nickName='Steve'" OK
+"from User u where u.human.name.first='Steve'" OK
+//HQLTest.testSelectClauseImplicitJoin
+"select d.owner.mother from Dog d" OK
+"select d.owner.mother.description from Dog d" OK
+"select d.owner.mother from Dog d, Dog h" OK
+//HQLTest.testFromClauseImplicitJoin
+"from DomesticAnimal da join da.owner.mother m where m.bodyWeight > 10" OK
+//HQLTest.testImplicitJoinInFrom
+"from Human h join h.mother.mother.offspring o" OK
+//HQLTest.testDuplicateImplicitJoinInSelect
+"select an.mother.bodyWeight from Animal an join an.mother m where an.mother.bodyWeight > 10" OK
+"select an.mother.bodyWeight from Animal an where an.mother.bodyWeight > 10" OK
+"select an.mother from Animal an where an.mother.bodyWeight is not null" OK
+"select an.mother.bodyWeight from Animal an order by an.mother.bodyWeight" OK
+//HQLTest.testSelectProperty2
+"select an, mo.bodyWeight from Animal an inner join an.mother mo where an.bodyWeight < mo.bodyWeight" OK
+"select an, mo, an.bodyWeight, mo.bodyWeight from Animal an inner join an.mother mo where an.bodyWeight < mo.bodyWeight" OK
+//HQLTest.testSubclassWhere
+"from PettingZoo pz1, PettingZoo pz2 where pz1.id = pz2.id" OK
+"from PettingZoo pz1, PettingZoo pz2 where pz1.id = pz2" OK
+"from PettingZoo pz where pz.id > 0 " OK
+//HQLTest.testNestedImplicitJoinsInSelect
+"select foo.foo.foo.foo.string from org.hibernate.test.legacy.Foo foo where foo.foo.foo = 'bar'" OK
+"select foo.foo.foo.foo.string from org.hibernate.test.legacy.Foo foo" OK
+//HQLTest.testNestedComponent
+"from org.hibernate.test.legacy.Foo foo where foo.component.subcomponent.name='bar'" OK
+//HQLTest.testNull2
+"from Human h where not( h.nickName is null )" OK
+"from Human h where not( h.nickName is not null )" OK
+//HQLTest.testUnknownFailureFromMultiTableTest
+"from Lower s where s.yetanother.name='name'" OK
+//HQLTest.testJoinInSubselect
+"from Animal a where a in (select m from Animal an join an.mother m)" OK
+"from Animal a where a in (select o from Animal an join an.offspring o)" OK
+//HQLTest.testJoinedSubclassImplicitJoin
+"from org.hibernate.test.legacy.Lower s where s.yetanother.name='name'" OK
+//HQLTest.testProjectProductJoinedSubclass
+"select zoo from Zoo zoo, PettingZoo pz where zoo=pz" OK
+"select zoo, pz from Zoo zoo, PettingZoo pz where zoo=pz" OK
+//HQLTest.testCorrelatedSubselect1
+"from Animal a where exists (from a.offspring o where o.bodyWeight>10)" OK
+//HQLTest.testOuterAliasInSubselect
+"from Human h where h = (from Animal an where an = h)" OK
+//HQLTest.testFetch
+"from Zoo zoo left join zoo.mammals" OK
+"from Zoo zoo left join fetch zoo.mammals" OK
+//HQLTest.testOneToManyElementFunctionInWhere
+"from Zoo zoo where 'dog' in indices(zoo.mammals)" OK
+"from Zoo zoo, Dog dog where dog in elements(zoo.mammals)" OK
+//HQLTest.testManyToManyElementFunctionInSelect
+"select elements(zoo.mammals) from Zoo zoo" OK
+"select indices(zoo.mammals) from Zoo zoo" OK
+//HQLTest.testManyToManyInJoin
+ "select x.id from Human h1 join h1.family x" OK
+"select index(h2) from Human h1 join h1.family h2" OK
+//HQLTest.testManyToManyInSubselect
+ "from Human h1, Human h2 where h2 in (select x.id from h1.family x)" OK
+//HQLTest.testOneToManyIndexAccess
+ "from Zoo zoo where zoo.mammals['dog'] is not null" OK
+//HQLTest.testImpliedSelect
+ "select zoo from Zoo zoo" OK
+ "from Zoo zoo" OK
+ "from Zoo zoo join zoo.mammals m" OK
+ "from Zoo" OK
+ "from Zoo zoo join zoo.mammals" OK
+//HQLTest.testVectorSubselect
+ "from Animal a where ('foo', 'bar') in (select m.description, m.bodyWeight from a.mother m)" OK
+//HQLTest.testWierdSubselectImplicitJoinStuff
+"from Simple s where s = some( select sim from Simple sim where sim.other.count=s.other.count ) and s.other.count > 0" OK
+//HQLTest.testCollectionsInSelect2
+ "select foo.string from Bar bar left join bar.baz.fooArray foo where bar.string = foo.string" OK
+//HQLTest.testAssociationPropertyWithoutAlias
+"from Animal where zoo is null" OK
+//HQLTest.testComponentNoAlias
+"from Human where name.first = 'Gavin'" OK
+//ASTParserLoadingTest.testComponentNullnessChecks
+"from Human where name is null" OK
+"from Human where name is not null" OK
+"from Human where cast(? as string) is null" OK
+"from Human where ? is null" OK
+//ASTParserLoadingTest.testInvalidCollectionDereferencesFail
+"from Animal a join a.offspring o where o.description = 'xyz'" OK
+"from Animal a join a.offspring o where o.father.description = 'xyz'" OK
+"from Animal a join a.offspring o order by o.description" OK
+"from Animal a join a.offspring o order by o.father.description" OK
+"from Animal a order by a.offspring.description" OK
+"from Animal a order by a.offspring.father.description" OK
+//ASTParserLoadingTest.testExpressionWithParamInFunction
+"from Animal where abs(cast(:x as long) - :y) < 2.0" OK
+"from Animal where abs(:x - cast(:y as long)) < 2.0" OK
+"from Animal where abs(cast(:x as long) - cast(:y as long)) < 2.0" OK
+"from Animal where abs(:x - :y) < 2.0" OK
+"from Animal where lower(upper(cast(:foo as string))) like 'f%'" OK
+"from Animal where lower(upper(:foo)) like 'f%'" OK
+"from Animal a where abs(abs(a.bodyWeight - 1.0 + :param) * abs(length('ffobar')-3)) = 3.0" OK
+"from Animal where lower(upper('foo') || upper(cast(:bar as string))) like 'f%'" OK
+"from Animal where lower(upper('foo') || upper(:bar)) like 'f%'" OK
+"from Animal where abs(cast(1 as float) - cast(:param as float)) = 1.0" OK
+//ASTParserLoadingTest.testCrazyIdFieldNames
+"select e.heresAnotherCrazyIdFieldName from MoreCrazyIdFieldNameStuffEntity e" OK
+//ASTParserLoadingTest.testImplicitJoinsInDifferentClauses
+"select e.owner from SimpleAssociatedEntity e" OK
+"select e.id, e.owner from SimpleAssociatedEntity e" OK
+"from SimpleAssociatedEntity e order by e.owner" OK
+"select e.owner.id, count(*) from SimpleAssociatedEntity e group by e.owner" OK
+//ASTParserLoadingTest.testNestedComponentIsNull
+"from Commento c where c.marelo.commento.mcompr is null" OK
+//ASTParserLoadingTest.testSpecialClassPropertyReference
+"select a.description from Animal a where a.class = Mammal" OK
+"select a.class from Animal a" OK
+"from Animal an where an.class = Dog" OK
+//ASTParserLoadingTest.testSpecialClassPropertyReferenceFQN
+"from Zoo zoo where zoo.class = org.hibernate.test.hql.PettingZoo" OK
+"select a.description from Animal a where a.class = org.hibernate.test.hql.Mammal" OK
+"from DomesticAnimal an where an.class = org.hibernate.test.hql.Dog" OK
+"from Animal an where an.class = org.hibernate.test.hql.Dog" OK
+//ASTParserLoadingTest.testSubclassOrSuperclassPropertyReferenceInJoinedSubclass
+"from Zoo z join z.mammals as m where m.name.first = 'John'" OK
+"from Zoo z join z.mammals as m where m.pregnant = false" OK
+"select m.pregnant from Zoo z join z.mammals as m where m.pregnant = false" OK
+"from Zoo z join z.mammals as m where m.description = 'tabby'" OK
+"select m.description from Zoo z join z.mammals as m where m.description = 'tabby'" OK
+"select m.name from Zoo z join z.mammals as m where m.name.first = 'John'" OK
+"select m.pregnant from Zoo z join z.mammals as m" OK
+"select m.description from Zoo z join z.mammals as m" OK
+"select m.name from Zoo z join z.mammals as m" OK
+"from DomesticAnimal da join da.owner as o where o.nickName = 'Gavin'" OK
+"select da.father from DomesticAnimal da join da.owner as o where o.nickName = 'Gavin'" OK
+//ASTParserLoadingTest.testJPAPositionalParameterList
+"from Human where name.last in (?1)" OK
+//ASTParserLoadingTest.testComponentQueries
+"select h.name from Human h" OK
+"from Human h where h.name = h.name" OK
+"from Human h where h.name = :name" OK
+"from Human where name = :name" OK
+"from Human h where :name = h.name" OK
+"from Human h where :name <> h.name" OK
+"from Human h where h.name = ('John', 'X', 'Doe')" OK
+"from Human h where ('John', 'X', 'Doe') = h.name" OK
+"from Human h where ('John', 'X', 'Doe') <> h.name" OK
+"from Human h where ('John', 'X', 'Doe') >= h.name" OK
+"from Human h order by h.name" OK
+//ASTParserLoadingTest.testComponentParameterBinding
+"from Order o where o.customer.name =:name and o.id = :id" OK
+"from Order o where o.id = :id and o.customer.name =:name " OK
+//ASTParserLoadingTest.testAnyMappingReference
+"from PropertySet p where p.someSpecificProperty = :ssp" OK
+//ASTParserLoadingTest.testJdkEnumStyleEnumConstant
+"from Zoo z where z.classification = org.hibernate.test.hql.Classification.LAME" OK
+//ASTParserLoadingTest.testParameterTypeMismatchFailureExpected
+"from Animal a where a.description = :nonstring" OK
+//ASTParserLoadingTest.testMultipleBagFetchesFail
+"from Human h join fetch h.friends f join fetch f.friends fof" OK
+//ASTParserLoadingTest.testCollectionJoinsInSubselect
+"select h.id, h.description from Human h left join h.friends where h in ( select h1 from Human h1 left join h1.friends f where h1.id=1)" OK
+"select h.id, h.description from Human h left join h.friends f where f in ( select h1 from Human h1 left join h1.friends f1 where h = f1 )" OK
+//ASTParserLoadingTest.testCollectionFetchWithDistinctionAndLimit
+"select distinct p from Animal p inner join fetch p.offspring" OK
+"select p from Animal p inner join fetch p.offspring order by p.id" OK
+//ASTParserLoadingTest.testFetchInSubqueryFails
+"from Animal a where a.mother in (select m from Animal a1 inner join a1.mother as m join fetch m.mother)" OK
+//ASTParserLoadingTest.testQueryMetadataRetrievalWithFetching
+"from Animal a inner join fetch a.mother" OK
+//ASTParserLoadingTest.testSuperclassPropertyReferenceAfterCollectionIndexedAccess
+"from Zoo zoo where zoo.mammals['tiger'].mother.bodyWeight > 3.0f" OK
+//ASTParserLoadingTest.testJoinFetchCollectionOfValues
+"select h from Human as h join fetch h.nickNames" OK
+//ASTParserLoadingTest.testIntegerLiterals
+"from Foo where long = 1" OK
+"from Foo where long = 1L" OK
+//ASTParserLoadingTest.testDecimalLiterals
+"from Animal where bodyWeight > 100.0e-10" OK
+"from Animal where bodyWeight > 100.0E-10" OK
+"from Animal where bodyWeight > 100.001f" OK
+"from Animal where bodyWeight > 100.001F" OK
+"from Animal where bodyWeight > 100.001d" OK
+"from Animal where bodyWeight > 100.001D" OK
+"from Animal where bodyWeight > .001f" OK
+"from Animal where bodyWeight > 100e-10" OK
+"from Animal where bodyWeight > .01E-10" OK
+"from Animal where bodyWeight > 1e-38" OK
+//ASTParserLoadingTest.testNakedPropertyRef
+"from Animal where bodyWeight = bodyWeight" OK
+"select bodyWeight from Animal" OK
+"select max(bodyWeight) from Animal" OK
+//ASTParserLoadingTest.testNakedComponentPropertyRef
+"select name from Human" OK
+"select upper(h.name.first) from Human as h" OK
+"select upper(name.first) from Human" OK
+//ASTParserLoadingTest.testNakedImplicitJoins
+"from Animal where mother.father.id = 1" OK
+//ASTParserLoadingTest.testNakedEntityAssociationReference
+"from Animal where mother = :mother" OK
+//ASTParserLoadingTest.testNakedMapIndex
+"from Zoo where mammals['dog'].description like '%black%'" OK
+//ASTParserLoadingTest.testInvalidFetchSemantics
+"select mother from Human a left join fetch a.mother mother" OK
+//ASTParserLoadingTest.testArithmetic
+"select 2*2*2*2*(2*2) from Zoo" OK
+"select 2 / (1+1) from Zoo" OK
+"select 2 - (1+1) from Zoo" OK
+"select 2 - 1 + 1 from Zoo" OK
+"select 2 * (1-1) from Zoo" OK
+"select 4 / (2 * 2) from Zoo" OK
+"select 4 / 2 * 2 from Zoo" OK
+"select 2 * (2/2) from Zoo" OK
+"select 2 * (2/2+1) from Zoo" OK
+//ASTParserLoadingTest.testNestedCollectionFetch
+"from Animal a left join fetch a.offspring o left join fetch o.offspring where a.mother.id = 1 order by a.description" OK
+"from Zoo z left join fetch z.animals a left join fetch a.offspring where z.name ='MZ' order by a.description" OK
+"from Human h left join fetch h.pets a left join fetch a.offspring where h.name.first ='Gavin' order by a.description" OK
+//ASTParserLoadingTest.testSelectClauseSubselect
+"select (select max(z.id) from a.zoo z) from Animal a" OK
+"select (select max(z.id) from a.zoo z where z.name=:name) from Animal a" OK
+//ASTParserLoadingTest.testInitProxy
+"from Animal a" OK
+//ASTParserLoadingTest.testSelectClauseImplicitJoin
+"select distinct a.zoo from Animal a where a.zoo is not null" OK
+//ASTParserLoadingTest.testComponentOrderBy
+"from Human as h order by h.name" OK
+//ASTParserLoadingTest.testCastInSelect
+"select cast(bodyWeight as integer) from Animal" OK
+"select cast(a.bodyWeight as integer) from Animal a" OK
+//ASTParserLoadingTest.testAliases
+"select a.bodyWeight as abw, a.description from Animal a" OK
+"select count(*), avg(a.bodyWeight) as avg from Animal a" OK
+//ASTParserLoadingTest.testParameterMixing
+"from Animal a where a.description = ? and a.bodyWeight = ? or a.bodyWeight = :bw" OK
+//ASTParserLoadingTest.testOrdinalParameters
+"from Animal a where a.description = ? and a.bodyWeight = ?" OK
+"from Animal a where a.bodyWeight in (?, ?)" OK
+//ASTParserLoadingTest.testIndexParams
+"from Zoo zoo where zoo.mammals[:name] = :id" OK
+"from Zoo zoo where zoo.mammals[:name].bodyWeight > :w" OK
+"from Zoo zoo where zoo.animals[:sn].mother.bodyWeight < :mw" OK
+"from Zoo zoo where zoo.animals[:sn].description like :desc and zoo.animals[:sn].bodyWeight > :wmin and zoo.animals[:sn].bodyWeight < :wmax" OK
+"from Human where addresses[:type].city = :city and addresses[:type].country = :country" OK
+//ASTParserLoadingTest.testAggregation
+"select sum(h.bodyWeight) from Human h" OK
+"select avg(h.height) from Human h" OK
+"select max(a.id) from Animal a" OK
+//ASTParserLoadingTest.testSelectClauseCase
+"select case nickName when 'Oney' then 'gavin' when 'Turin' then 'christian' else nickName end from Human" OK
+"select case when bodyWeight > 100 then 'fat' else 'skinny' end from Human" OK
+//ASTParserLoadingTest.testImplicitPolymorphism
+"from java.lang.Comparable" OK
+"from java.lang.Object" OK
+//ASTParserLoadingTest.testCoalesce
+"from Human h where coalesce(h.nickName, h.name.first, h.name.last) = 'max'" OK
+"select nullif(nickName, '1e1') from Human" OK
+//ASTParserLoadingTest.testStr
+"select str(an.bodyWeight) from Animal an where str(an.bodyWeight) like '%1%'" OK
+"select str(an.bodyWeight, 8, 3) from Animal an where str(an.bodyWeight, 8, 3) like '%1%'" OK
+"select str(current_date) from Animal" OK
+"select str(year(current_date))||'-'||str(month(current_date))||'-'||str(day(current_date)) from Animal" OK
+//ASTParserLoadingTest.testCast
+"from Human h where h.nickName like 'G%'" OK
+"from Animal a where cast(a.bodyWeight as string) like '1.%'" OK
+"from Animal a where cast(a.bodyWeight as integer) = 1" OK
+//ASTParserLoadingTest.testExtract
+"select second(current_timestamp()), minute(current_timestamp()), hour(current_timestamp()) from Mammal m" OK
+"select day(m.birthdate), month(m.birthdate), year(m.birthdate) from Mammal m" OK
+"select extract(second from current_timestamp()), extract(minute from current_timestamp()), extract(hour from current_timestamp()) from Mammal m" OK
+"select extract(day from m.birthdate), extract(month from m.birthdate), extract(year from m.birthdate) from Mammal m" OK
+//ASTParserLoadingTest.testSelectExpressions
+"select 'found', lower(h.name.first) from Human h where lower(h.name.first) = 'gavin'" OK
+"select 'found', lower(h.name.first) from Human h where concat(h.name.first, ' ', h.name.initial, ' ', h.name.last) = 'Gavin A King'" OK
+"select 'found', lower(h.name.first) from Human h where h.name.first||' '||h.name.initial||' '||h.name.last = 'Gavin A King'" OK
+"select a.bodyWeight + m.bodyWeight from Animal a join a.mother m" OK
+"select 2.0 * (a.bodyWeight + m.bodyWeight) from Animal a join a.mother m" OK
+"select sum(a.bodyWeight + m.bodyWeight) from Animal a join a.mother m" OK
+"select sum(a.mother.bodyWeight * 2.0) from Animal a" OK
+"select concat(h.name.first, ' ', h.name.initial, ' ', h.name.last) from Human h" OK
+"select h.name.first||' '||h.name.initial||' '||h.name.last from Human h" OK
+"select nickName from Human" OK
+"select lower(nickName) from Human" OK
+"select abs(bodyWeight*-1) from Human" OK
+"select upper(h.name.first||' ('||h.nickName||')') from Human h" OK
+"select abs(a.bodyWeight-:param) from Animal a" OK
+"select abs(:param - a.bodyWeight) from Animal a" OK
+"select lower(upper('foo')) from Animal" OK
+"select lower(upper('foo') || upper('bar')) from Animal" OK
+"select sum(abs(bodyWeight - 1.0) * abs(length('ffobar')-3)) from Animal" OK
+//ASTParserLoadingTest.testImplicitJoin
+"from Animal a where a.mother.bodyWeight < 2.0 or a.mother.bodyWeight > 9.0" OK
+"from Animal a where a.mother.bodyWeight > 2.0 and a.mother.bodyWeight > 9.0" OK
+//ASTParserLoadingTest.testSimpleSelect
+"select a.mother from Animal as a" OK
+//ASTParserLoadingTest.testWhere
+"from Animal an where an.bodyWeight > 10" OK
+"from Animal an where not an.bodyWeight > 10" OK
+"from Animal an where an.bodyWeight between 0 and 10" OK
+"from Animal an where an.bodyWeight not between 0 and 10" OK
+"from Animal an where sqrt(an.bodyWeight)/2 > 10" OK
+"from Animal an where (an.bodyWeight > 10 and an.bodyWeight < 100) or an.bodyWeight is null" OK
+//ASTParserLoadingTest.testEntityFetching
+"from Animal an join fetch an.mother" OK
+"select an from Animal an join fetch an.mother" OK
+//ASTParserLoadingTest.testCollectionFetching
+"from Animal an join fetch an.offspring" OK
+"select an from Animal an join fetch an.offspring" OK
+//ASTParserLoadingTest.testProjectionQueries
+"select an.mother.id, max(an.bodyWeight) from Animal an group by an.mother.id" OK
+//ASTParserLoadingTest.testStandardFunctions
+"select current_time(), current_date(), current_timestamp() from Product" OK
+//ASTParserLoadingTest.testDynamicInstantiationQueries
+"select new list(an.description, an.bodyWeight) from Animal an" OK
+"select new map(an.description, an.bodyWeight) from Animal an" OK
+"select new map(an.description as descr, an.bodyWeight as bw) from Animal an" OK
+//ASTParserLoadingTest.testResultTransformerScalarQueries
+"select an.description as description, an.bodyWeight as bodyWeight from Animal an order by bodyWeight desc" OK
+"select a from Animal a, Animal b order by a.id" OK
+//ASTParserLoadingTest.testResultTransformerEntityQueries
+"select an as an from Animal an order by bodyWeight desc" OK
+//ASTParserLoadingTest.testEJBQLFunctions
+"from Animal a where a.description = concat('1', concat('2','3'), '4'||'5')||'0'" OK
+"from Animal a where substring(a.description, 1, 3) = 'cat'" OK
+"from Animal a where lower(a.description) = 'cat'" OK
+"from Animal a where upper(a.description) = 'CAT'" OK
+"select upper(a.description) from Animal a" OK
+"from Animal a where length(a.description) = 5" OK
+"from Animal a where locate('abc', a.description, 2) = 2" OK
+"from Animal a where locate('abc', a.description) = 2" OK
+"select locate('cat', a.description, 2) from Animal a" OK
+"from Animal a where trim(trailing '_' from a.description) = 'cat'" OK
+"from Animal a where trim(leading '_' from a.description) = 'cat'" OK
+"from Animal a where trim(both from a.description) = 'cat'" OK
+"from Animal a where trim(a.description) = 'cat'" OK
+"from Animal a where abs(a.bodyWeight) = sqrt(a.bodyWeight)" OK
+"from Animal a where mod(16, 4) = 4" OK
+"from Animal a where bit_length(a.bodyWeight) = 24" OK
+"select bit_length(a.bodyWeight) from Animal a" OK
+"from Animal a where a.description like '%a%'" OK
+"from Animal a where a.description not like '%a%'" OK
+"from Animal a where a.description like 'x%ax%' escape 'x'" OK
+//ASTParserLoadingTest.testSubselectBetween
+"from Animal x where (select max(a.bodyWeight) from Animal a) between 0 and 100" OK
+//
+//"from Animal x where (x.name, x.bodyWeight) = ('cat', 20)" OK
+
+/*
+DELETE STATEMENT
+*/
+"delete Animal where mother is not null" OK
+"delete Animal where not mother is not null" OK
+"delete Animal" OK
+"delete from Thing" OK
+"delete from Person" OK
+"delete from Location" OK
+"delete from Child" OK
+"delete from Parent" OK
+"delete from Item" OK
+"delete Customer where contactOwner is not null" OK
+"delete Employee where manager is not null" OK
+"delete Person" OK
+"delete Locality" OK
+"delete Country" OK
+"delete Continent" OK
+"delete from DataPoint" OK
+"delete from User where userid = :userid" OK
+"delete from Mail where alias = :alias" OK
+"delete from NumberedNode where name like 'child%'" OK
+"delete from fooArray where id_='???' and i>=8" OK
+"delete from t_user" OK
+"delete Animal where not description like 'root%'" OK
+"delete Animal where description like 'grand%'" OK
+"delete from Animal where mother is not null or father is not null" OK
+"delete Animal where mother = :mother" OK
+"delete EntityWithCrazyCompositeKey where id.id = 1 and id.otherId = 2" OK
+"delete from EntityWithCrazyCompositeKey where id.id = 1 and id.otherId = 2" OK
+"delete from EntityWithCrazyCompositeKey e where e.id.id = 1 and e.id.otherId = 2" OK
+"delete from Bar where barString = 's'" OK
+"delete Vehicle where owner = :owner" OK
+"delete Mammal where bodyWeight > 150" OK
+"delete from User u where u not in (select u from User u)" OK
+"delete SimpleEntityWithAssociation e where size( e.associatedEntities ) = 0 and e.name like '%'" OK
+"delete Animal where bodyWeight = null" OK
+"delete from PICKUP" OK
+"delete from Address where id = ? and version = ?" OK
+/*
+UDPATE STATEMENT
+*/
+"update Paper set color = :newColor" OK
+"update Document set name = :newName where name = :oldName" OK
+"update Mammal set bodyWeight = null" OK
+"update Zoo set address.city = null" OK
+"update PettingZoo set address.city = null" OK
+"update Vehicle set owner = null where owner = 'Steve'" OK
+"update Vehicle set owner = 'Steve'" OK
+"update Mammal set bodyWeight = ( select max(bodyWeight) from Animal )" OK
+"update Mammal set bodyWeight = 25" OK
+"update Mammal set description = description" OK
+"update Animal set bodyWeight = bodyWeight + :w1 + :w2" OK
+"update Animal set description = :newDesc where description = :desc" OK
+"update Animal set description = description where description = :desc" OK
+"update Zoo as z set name = name where id = :id" OK
+"update Zoo as z set z.name = z.name" OK
+"update PettingZoo pz set pz.name = pz.name where pz.id = :id" OK
+"update PettingZoo set name = name" OK
+"update Human set mother.name.initial = :initial" OK
+"update Animal a set a.mother = (from Animal where id = 1) where a.id = 2" OK
+"update Animal a set a.mother = null where a.id = 2" OK
+"update Human set name.first = :correction where id = :id" OK
+"update versioned TimestampVersioned set name = name" OK
+"update versioned IntegerVersioned set name = name" OK
+<<update SimpleEntityWithAssociation e
+ set e.name = 'updated'
+ where exists (
+ select a.id
+ from e.associatedEntities a
+ where a.name = 'one-to-many-association'
+ )>> OK
+<<update SimpleEntityWithAssociation e
+ set e.name = 'updated'
+ where exists (
+ select a.id
+ from e.manyToManyAssociatedEntities a
+ where a.name = 'many-to-many-association'
+ )>> OK
+<<update Human h
+ set h.description = 'updated'
+ where exists (
+ select f.id
+ from h.friends f
+ where f.name.last = 'Public'
+ )>> OK
+"update Human set Human.description = 'xyz' where Human.id = 1 and Human.description is null" OK
+"update BooleanLiteralEntity set yesNoBoolean = true, trueFalseBoolean = true, zeroOneBoolean = true" OK
+"update BooleanLiteralEntity set yesNoBoolean = :b1, trueFalseBoolean = :b2, zeroOneBoolean = :b3" OK
+"update NonExistentEntity e set e.someProp = ?" OK
+"update Customer c set c.company = 'XYZ'" OK
+"update User u set u.username = :un where u.name = :n" OK
+"update Person p set p.name = '<male>'" OK
+"update Person p set p.name = 'Shawn'" OK
+"update Address set city = ?, state=?, zip=?, version = ? where id in (select aid from Person)" OK
+"update Address set city = ?, state=?, zip=?, version = ? where id = ? and version = ? " OK
+/*
+INSERT STATEMENT
+*/
+"insert into Animal (description, bodyWeight) select h.description, h.bodyWeight from Human h join h.mother m where m.mother is not null" OK
+"insert into Animal (description, bodyWeight) select h.description, h.bodyWeight from Human h where h.mother.mother is not null" OK
+"insert into TimestampVersioned ( name ) select name from TimestampVersioned" OK
+"insert into IntegerVersioned ( name ) select name from IntegerVersioned" OK
+"insert into PettingZoo (name) select name from Zoo" OK
+"insert into Joiner (name, joinedName) select vin, owner from Car" OK
+"insert into Human (id, bodyWeight) select id, bodyWeight from Lizard" OK
+"insert into Pickup (owner, vin, id) select id, vin, owner from Car" OK
+"insert into Animal (description, bodyWeight, mother) select description, bodyWeight, mother from Human" OK
+"insert into PICKUP (id, vin, owner) select id, vin, owner from Car" OK
+"insert into Pickup (id, vin, owner) select id, vin, owner from Car" OK
Property changes on: core/branches/antlr3/src/test/gunit/org/hibernate/sql/ast/phase/hql/parse/gUnitHQLTreeWalker.testsuite
___________________________________________________________________
Name: svn:eol-style
+ native
15 years, 7 months
Hibernate SVN: r16347 - core/trunk/annotations/src/test/java/org/hibernate/test/annotations/onetomany.
by hibernate-commits@lists.jboss.org
Author: gbadner
Date: 2009-04-15 15:18:26 -0400 (Wed, 15 Apr 2009)
New Revision: 16347
Modified:
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/onetomany/OneToManyTest.java
Log:
ANN-817 - 8-bit characters in string values cause unit test failures
Modified: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/onetomany/OneToManyTest.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/onetomany/OneToManyTest.java 2009-04-15 19:14:22 UTC (rev 16346)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/onetomany/OneToManyTest.java 2009-04-15 19:18:26 UTC (rev 16347)
@@ -67,7 +67,7 @@
chmpsElysees.setStreetName( "Champs Elysees" );
chmpsElysees.setCity( paris );
Street grandeArmee = new Street();
- grandeArmee.setStreetName( "Grande Arm�e" );
+ grandeArmee.setStreetName( "Grande Armee" );
grandeArmee.setCity( paris );
s.persist( rochechoir );
s.persist( chmpsElysees );
15 years, 7 months
Hibernate SVN: r16346 - annotations/branches/v3_4_0_GA_CP/src/test/org/hibernate/test/annotations/onetomany.
by hibernate-commits@lists.jboss.org
Author: gbadner
Date: 2009-04-15 15:14:22 -0400 (Wed, 15 Apr 2009)
New Revision: 16346
Modified:
annotations/branches/v3_4_0_GA_CP/src/test/org/hibernate/test/annotations/onetomany/OneToManyTest.java
Log:
JBPAPP-1878 ANN-817 - 8-bit characters in string values cause unit test failures
Modified: annotations/branches/v3_4_0_GA_CP/src/test/org/hibernate/test/annotations/onetomany/OneToManyTest.java
===================================================================
--- annotations/branches/v3_4_0_GA_CP/src/test/org/hibernate/test/annotations/onetomany/OneToManyTest.java 2009-04-15 19:09:32 UTC (rev 16345)
+++ annotations/branches/v3_4_0_GA_CP/src/test/org/hibernate/test/annotations/onetomany/OneToManyTest.java 2009-04-15 19:14:22 UTC (rev 16346)
@@ -67,7 +67,7 @@
chmpsElysees.setStreetName( "Champs Elysees" );
chmpsElysees.setCity( paris );
Street grandeArmee = new Street();
- grandeArmee.setStreetName( "Grande Arm�e" );
+ grandeArmee.setStreetName( "Grande Armee" );
grandeArmee.setCity( paris );
s.persist( rochechoir );
s.persist( chmpsElysees );
15 years, 7 months
Hibernate SVN: r16345 - annotations/branches/v3_3_1_GA_CP/src/test/org/hibernate/test/annotations/onetomany.
by hibernate-commits@lists.jboss.org
Author: gbadner
Date: 2009-04-15 15:09:32 -0400 (Wed, 15 Apr 2009)
New Revision: 16345
Modified:
annotations/branches/v3_3_1_GA_CP/src/test/org/hibernate/test/annotations/onetomany/OneToManyTest.java
Log:
JBPAPP-1878 ANN-817 - 8-bit characters in string values cause unit test failures
Modified: annotations/branches/v3_3_1_GA_CP/src/test/org/hibernate/test/annotations/onetomany/OneToManyTest.java
===================================================================
--- annotations/branches/v3_3_1_GA_CP/src/test/org/hibernate/test/annotations/onetomany/OneToManyTest.java 2009-04-15 18:40:43 UTC (rev 16344)
+++ annotations/branches/v3_3_1_GA_CP/src/test/org/hibernate/test/annotations/onetomany/OneToManyTest.java 2009-04-15 19:09:32 UTC (rev 16345)
@@ -65,7 +65,7 @@
chmpsElysees.setStreetName( "Champs Elysees" );
chmpsElysees.setCity( paris );
Street grandeArmee = new Street();
- grandeArmee.setStreetName( "Grande Arm�e" );
+ grandeArmee.setStreetName( "Grande Armee" );
grandeArmee.setCity( paris );
s.persist( rochechoir );
s.persist( chmpsElysees );
15 years, 7 months
Hibernate SVN: r16344 - core/trunk/annotations/src/test/java/org/hibernate/test/annotations/manytomany.
by hibernate-commits@lists.jboss.org
Author: gbadner
Date: 2009-04-15 14:40:43 -0400 (Wed, 15 Apr 2009)
New Revision: 16344
Modified:
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/manytomany/CatPk.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/manytomany/ManPk.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/manytomany/WomanPk.java
Log:
ANN-821 - org.hibernate.test.annotations.manytomany.ManyToManyTest fails on sybase due to index too large
Modified: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/manytomany/CatPk.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/manytomany/CatPk.java 2009-04-15 18:33:43 UTC (rev 16343)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/manytomany/CatPk.java 2009-04-15 18:40:43 UTC (rev 16344)
@@ -2,6 +2,7 @@
package org.hibernate.test.annotations.manytomany;
import java.io.Serializable;
+import javax.persistence.Column;
/**
* @author Emmanuel Bernard
@@ -10,6 +11,7 @@
private String name;
private String thoroughbred;
+ @Column(length=128)
public String getThoroughbred() {
return thoroughbred;
}
@@ -18,6 +20,7 @@
this.thoroughbred = thoroughbred;
}
+ @Column(length=128)
public String getName() {
return name;
}
Modified: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/manytomany/ManPk.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/manytomany/ManPk.java 2009-04-15 18:33:43 UTC (rev 16343)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/manytomany/ManPk.java 2009-04-15 18:40:43 UTC (rev 16344)
@@ -3,6 +3,7 @@
import java.io.Serializable;
import javax.persistence.Embeddable;
+import javax.persistence.Column;
/**
* @author Emmanuel Bernard
@@ -47,10 +48,12 @@
this.lastName = lastName;
}
+ @Column(length=128)
public String getFirstName() {
return firstName;
}
+ @Column(length=128)
public String getLastName() {
return lastName;
}
Modified: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/manytomany/WomanPk.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/manytomany/WomanPk.java 2009-04-15 18:33:43 UTC (rev 16343)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/manytomany/WomanPk.java 2009-04-15 18:40:43 UTC (rev 16344)
@@ -3,6 +3,7 @@
import java.io.Serializable;
import javax.persistence.Embeddable;
+import javax.persistence.Column;
/**
* @author Emmanuel Bernard
@@ -39,10 +40,12 @@
this.lastName = lastName;
}
+ @Column(length=128)
public String getFirstName() {
return firstName;
}
+ @Column(length=128)
public String getLastName() {
return lastName;
}
15 years, 7 months
Hibernate SVN: r16343 - annotations/branches/v3_4_0_GA_CP/src/test/org/hibernate/test/annotations/manytomany.
by hibernate-commits@lists.jboss.org
Author: gbadner
Date: 2009-04-15 14:33:43 -0400 (Wed, 15 Apr 2009)
New Revision: 16343
Modified:
annotations/branches/v3_4_0_GA_CP/src/test/org/hibernate/test/annotations/manytomany/CatPk.java
annotations/branches/v3_4_0_GA_CP/src/test/org/hibernate/test/annotations/manytomany/ManPk.java
annotations/branches/v3_4_0_GA_CP/src/test/org/hibernate/test/annotations/manytomany/WomanPk.java
Log:
JBPAPP-1890 ANN-821 - org.hibernate.test.annotations.manytomany.ManyToManyTest fails on sybase due to index too large
Modified: annotations/branches/v3_4_0_GA_CP/src/test/org/hibernate/test/annotations/manytomany/CatPk.java
===================================================================
--- annotations/branches/v3_4_0_GA_CP/src/test/org/hibernate/test/annotations/manytomany/CatPk.java 2009-04-15 18:13:07 UTC (rev 16342)
+++ annotations/branches/v3_4_0_GA_CP/src/test/org/hibernate/test/annotations/manytomany/CatPk.java 2009-04-15 18:33:43 UTC (rev 16343)
@@ -2,6 +2,7 @@
package org.hibernate.test.annotations.manytomany;
import java.io.Serializable;
+import javax.persistence.Column;
/**
* @author Emmanuel Bernard
@@ -10,6 +11,7 @@
private String name;
private String thoroughbred;
+ @Column(length=128)
public String getThoroughbred() {
return thoroughbred;
}
@@ -18,6 +20,7 @@
this.thoroughbred = thoroughbred;
}
+ @Column(length=128)
public String getName() {
return name;
}
Modified: annotations/branches/v3_4_0_GA_CP/src/test/org/hibernate/test/annotations/manytomany/ManPk.java
===================================================================
--- annotations/branches/v3_4_0_GA_CP/src/test/org/hibernate/test/annotations/manytomany/ManPk.java 2009-04-15 18:13:07 UTC (rev 16342)
+++ annotations/branches/v3_4_0_GA_CP/src/test/org/hibernate/test/annotations/manytomany/ManPk.java 2009-04-15 18:33:43 UTC (rev 16343)
@@ -3,6 +3,7 @@
import java.io.Serializable;
import javax.persistence.Embeddable;
+import javax.persistence.Column;
/**
* @author Emmanuel Bernard
@@ -47,10 +48,12 @@
this.lastName = lastName;
}
+ @Column(length=128)
public String getFirstName() {
return firstName;
}
+ @Column(length=128)
public String getLastName() {
return lastName;
}
Modified: annotations/branches/v3_4_0_GA_CP/src/test/org/hibernate/test/annotations/manytomany/WomanPk.java
===================================================================
--- annotations/branches/v3_4_0_GA_CP/src/test/org/hibernate/test/annotations/manytomany/WomanPk.java 2009-04-15 18:13:07 UTC (rev 16342)
+++ annotations/branches/v3_4_0_GA_CP/src/test/org/hibernate/test/annotations/manytomany/WomanPk.java 2009-04-15 18:33:43 UTC (rev 16343)
@@ -3,6 +3,7 @@
import java.io.Serializable;
import javax.persistence.Embeddable;
+import javax.persistence.Column;
/**
* @author Emmanuel Bernard
@@ -39,10 +40,12 @@
this.lastName = lastName;
}
+ @Column(length=128)
public String getFirstName() {
return firstName;
}
+ @Column(length=128)
public String getLastName() {
return lastName;
}
15 years, 7 months