From 30e4a6fbfbf1518797c07394b59241bfd2467e07 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Wed, 8 Oct 2008 04:28:51 +0000 Subject: [PATCH] HHH-530 : followup on parameter handling git-svn-id: https://svn.jboss.org/repos/hibernate/core/branches/Branch_3_2@15270 1b8cb986-b30d-0410-93ca-fae66ebed9b2 --- grammar/sql-gen.g | 2 +- .../hibernate/hql/ast/exec/MultiTableUpdateExecutor.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/grammar/sql-gen.g b/grammar/sql-gen.g index ce98e617a2..678b074ce7 100644 --- a/grammar/sql-gen.g +++ b/grammar/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/src/org/hibernate/hql/ast/exec/MultiTableUpdateExecutor.java b/src/org/hibernate/hql/ast/exec/MultiTableUpdateExecutor.java index 4430e0c65d..6440e32fe1 100644 --- a/src/org/hibernate/hql/ast/exec/MultiTableUpdateExecutor.java +++ b/src/org/hibernate/hql/ast/exec/MultiTableUpdateExecutor.java @@ -108,9 +108,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 );