HHH-9621 : Add HQL query to warning about positional parameter usage

This commit is contained in:
Gail Badner 2015-02-18 11:30:50 -08:00
parent 36cc2c836c
commit 0215008851
1 changed files with 3 additions and 2 deletions

View File

@ -994,10 +994,11 @@ public class HqlSqlWalker extends HqlSqlBaseWalker implements ErrorReporter, Par
);
}
LOG.warnf(
"[DEPRECATION] Encountered positional parameter near line %s, column %s. Positional parameter " +
"[DEPRECATION] Encountered positional parameter near line %s, column %s in HQL: [%s]. Positional parameter " +
"are considered deprecated; use named parameters or JPA-style positional parameters instead.",
inputNode.getLine(),
inputNode.getColumn()
inputNode.getColumn(),
queryTranslatorImpl.getQueryString()
);
ParameterNode parameter = (ParameterNode) astFactory.create( PARAM, "?" );
PositionalParameterSpecification paramSpec = new PositionalParameterSpecification(