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 );