mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-18 00:55:16 +00:00
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
This commit is contained in:
parent
53dc224aed
commit
30e4a6fbfb
@ -213,7 +213,7 @@ selectExpr
|
|||||||
| aggregate
|
| aggregate
|
||||||
| c:constant { out(c); }
|
| c:constant { out(c); }
|
||||||
| arithmeticExpr
|
| arithmeticExpr
|
||||||
| PARAM { out("?"); }
|
| param:PARAM { out(param); }
|
||||||
| sn:SQL_NODE { out(sn); }
|
| sn:SQL_NODE { out(sn); }
|
||||||
| { out("("); } selectStatement { out(")"); }
|
| { out("("); } selectStatement { out(")"); }
|
||||||
;
|
;
|
||||||
|
@ -108,9 +108,10 @@ public int execute(QueryParameters parameters, SessionImplementor session) throw
|
|||||||
try {
|
try {
|
||||||
try {
|
try {
|
||||||
ps = session.getBatcher().prepareStatement( idInsertSelect );
|
ps = session.getBatcher().prepareStatement( idInsertSelect );
|
||||||
int parameterStart = getWalker().getNumberOfParametersInSetClause();
|
// int parameterStart = getWalker().getNumberOfParametersInSetClause();
|
||||||
List allParams = getIdSelectParameterSpecifications();
|
// List allParams = getIdSelectParameterSpecifications();
|
||||||
Iterator whereParams = allParams.subList( parameterStart, allParams.size() ).iterator();
|
// Iterator whereParams = allParams.subList( parameterStart, allParams.size() ).iterator();
|
||||||
|
Iterator whereParams = getIdSelectParameterSpecifications().iterator();
|
||||||
int sum = 1; // jdbc params are 1-based
|
int sum = 1; // jdbc params are 1-based
|
||||||
while ( whereParams.hasNext() ) {
|
while ( whereParams.hasNext() ) {
|
||||||
sum += ( ( ParameterSpecification ) whereParams.next() ).bind( ps, parameters, session, sum );
|
sum += ( ( ParameterSpecification ) whereParams.next() ).bind( ps, parameters, session, sum );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user