We're updating the issue view to help you get more done. 

Could not resolve javax.persistence.Parameter to org.hibernate.query.QueryParameter

Description

See class org.hibernate.query.procedure.internal.ProcedureParameterMetadata.

1 2 3 4 5 6 7 8 9 10 11 public <T> ProcedureParameterImplementor<T> resolve(Parameter<T> param) { if ( ProcedureParameterImplementor.class.isInstance( param ) ) { for ( ProcedureParameterImplementor parameter : parameters ) { if ( parameter == param ) { return parameter; } } } throw new IllegalArgumentException( "Could not resolve javax.persistence.Parameter to org.hibernate.query.QueryParameter" ); }

Code

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 _________ storedProcedureQuery.setParameter( new Parameter<String>() {       @Override       public String getName() {         return null;       }       @Override       public Integer getPosition() {         return 2;       }       @Override       public Class<String> getParameterType() {         return String.class;       }     }, "title'1" );

Not works. Because local implementation of interface javax.persistence.Parameter is not instance of ProcedureParameterImplementor

Environment

None

Status

Assignee

Andrea Boriero

Reporter

Sergey Chernolyas

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

5.3.0.CR1

Priority

Trivial