Skip to content

Commit

Permalink
HHH-7023 - Deprecate HQL-specific (JDBC-style) positional parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Ebersole committed Mar 1, 2012
1 parent 982aad7 commit d66d335
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -928,6 +928,12 @@ protected AST generatePositionalParameter(AST inputNode) throws SemanticExceptio
if ( namedParameters.size() > 0 ) {
throw new SemanticException( "cannot define positional parameter after any named parameters have been defined" );
}
LOG.warnf(
"[DEPRECATION] Encountered positional parameter near line %s, column %s. Positional parameter " +
"are considered deprecated; use named parameters or JPA-style positional parameters instead.",
inputNode.getLine(),
inputNode.getColumn()
);
ParameterNode parameter = ( ParameterNode ) astFactory.create( PARAM, "?" );
PositionalParameterSpecification paramSpec = new PositionalParameterSpecification(
inputNode.getLine(),
Expand Down

0 comments on commit d66d335

Please sign in to comment.