From ff128ca6f8598c69af53b91bdbcf3f74c7540769 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Wed, 8 Oct 2008 04:13:07 +0000 Subject: [PATCH] HHH-530 : followup on parameter handling git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@15268 1b8cb986-b30d-0410-93ca-fae66ebed9b2 --- core/src/main/antlr/sql-gen.g | 2 +- .../hibernate/hql/ast/exec/AbstractStatementExecutor.java | 1 - .../hibernate/hql/ast/exec/MultiTableUpdateExecutor.java | 7 ++++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/antlr/sql-gen.g b/core/src/main/antlr/sql-gen.g index e7d6abfbc5..9e860b574a 100644 --- a/core/src/main/antlr/sql-gen.g +++ b/core/src/main/antlr/sql-gen.g @@ -213,7 +213,7 @@ selectExpr | aggregate | c:constant { out(c); } | arithmeticExpr - | PARAM { out("?"); } + | param:PARAM { out(param); } | sn:SQL_NODE { out(sn); } | { out("("); } selectStatement { out(")"); } ; diff --git a/core/src/main/java/org/hibernate/hql/ast/exec/AbstractStatementExecutor.java b/core/src/main/java/org/hibernate/hql/ast/exec/AbstractStatementExecutor.java index 6795e6fb38..3eeec03af4 100644 --- a/core/src/main/java/org/hibernate/hql/ast/exec/AbstractStatementExecutor.java +++ b/core/src/main/java/org/hibernate/hql/ast/exec/AbstractStatementExecutor.java @@ -45,7 +45,6 @@ import org.hibernate.sql.InsertSelect; import org.hibernate.sql.Select; import org.hibernate.sql.SelectFragment; import org.hibernate.util.StringHelper; -import org.hibernate.util.EmptyIterator; import antlr.RecognitionException; import antlr.collections.AST; diff --git a/core/src/main/java/org/hibernate/hql/ast/exec/MultiTableUpdateExecutor.java b/core/src/main/java/org/hibernate/hql/ast/exec/MultiTableUpdateExecutor.java index 3d72173c68..303dad5256 100644 --- a/core/src/main/java/org/hibernate/hql/ast/exec/MultiTableUpdateExecutor.java +++ b/core/src/main/java/org/hibernate/hql/ast/exec/MultiTableUpdateExecutor.java @@ -131,9 +131,10 @@ public class MultiTableUpdateExecutor extends AbstractStatementExecutor { try { try { ps = session.getBatcher().prepareStatement( idInsertSelect ); - int parameterStart = getWalker().getNumberOfParametersInSetClause(); - List allParams = getIdSelectParameterSpecifications(); - Iterator whereParams = allParams.subList( parameterStart, allParams.size() ).iterator(); +// int parameterStart = getWalker().getNumberOfParametersInSetClause(); +// List allParams = getIdSelectParameterSpecifications(); +// Iterator whereParams = allParams.subList( parameterStart, allParams.size() ).iterator(); + Iterator whereParams = getIdSelectParameterSpecifications().iterator(); int sum = 1; // jdbc params are 1-based while ( whereParams.hasNext() ) { sum += ( ( ParameterSpecification ) whereParams.next() ).bind( ps, parameters, session, sum );