In 5.1:
- org.hibernate.procedure.ParameterRegistration.getType() returns java.lang.Class
In 5.3:
- org.hibernate.procedure.ParameterRegistration extends org.hibernate.query.procedure.ProcedureParameter, which extends org.hibernate.query.QueryParameter, which extends javax.persistence.Parameter
- org.hibernate.query.QueryParameter defines getType(), returning org.hibernate.type.Type.
- org.hibernate.query.QueryParameter has been annotated @Incubating, but getType() is overridden in org.hibernate.engine.query.spi.AbstractParameterDescriptor (not annotated with @Incubating)
- javax.persistence.Parameter.getParameterType() returns Class<T> (the return value that 5.1 applications expect)
Mitigation: Rename org.hibernate.query.QueryParameter.getType() to getHibernateType(); add a default method to org.hibernate.procedure.ParameterRegistration, getType() returning Class, that simply calls getParameterType(). This change in SPI should be documented in the migration guide. |