Implement ParameterMementoImpl#resolve() method

This commit is contained in:
Andrea Boriero 2021-10-01 12:45:35 +02:00 committed by Christian Beikov
parent 72d06c164a
commit 8276bd569a

View File

@ -13,7 +13,6 @@
import org.hibernate.CacheMode;
import org.hibernate.FlushMode;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.metamodel.model.domain.AllowableParameterType;
import org.hibernate.procedure.ProcedureCall;
@ -217,7 +216,25 @@ public AllowableParameterType getHibernateType() {
@Override
public ProcedureParameterImplementor resolve(SharedSessionContractImplementor session) {
throw new NotYetImplementedFor6Exception();
if ( getName() != null ) {
//noinspection unchecked
return new ProcedureParameterImpl(
getName(),
getMode(),
type,
getHibernateType()
);
}
else {
//noinspection unchecked
return new ProcedureParameterImpl(
getPosition(),
getMode(),
type,
getHibernateType()
);
}
}
/**