HHH-14801 Add ServiceRegistry as a parameter to the SqmFunctionDescriptors constructor
This commit is contained in:
parent
71b197d362
commit
9251e8bfdc
|
@ -38,7 +38,7 @@ public class PostgisDialectContributor implements ContributorImplementor {
|
|||
@Override
|
||||
public void contributeFunctions(FunctionContributions functionContributions) {
|
||||
HSMessageLogger.LOGGER.functionContributions( this.getClass().getCanonicalName() );
|
||||
PostgisSqmFunctionDescriptors postgisFunctions = new PostgisSqmFunctionDescriptors();
|
||||
PostgisSqmFunctionDescriptors postgisFunctions = new PostgisSqmFunctionDescriptors( getServiceRegistry() );
|
||||
|
||||
postgisFunctions.asMap().forEach( (key, desc) -> {
|
||||
functionContributions.contributeFunction( key.getName(), desc );
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.hibernate.query.sqm.function.NamedSqmFunctionDescriptor;
|
|||
import org.hibernate.query.sqm.function.SqmFunctionDescriptor;
|
||||
import org.hibernate.query.sqm.produce.function.StandardArgumentsValidators;
|
||||
import org.hibernate.query.sqm.produce.function.StandardFunctionReturnTypeResolvers;
|
||||
import org.hibernate.service.ServiceRegistry;
|
||||
import org.hibernate.spatial.KeyedSqmFunctionDescriptors;
|
||||
import org.hibernate.spatial.FunctionKey;
|
||||
|
||||
|
@ -25,7 +26,8 @@ public class PostgisSqmFunctionDescriptors implements KeyedSqmFunctionDescriptor
|
|||
|
||||
private final Map<FunctionKey, SqmFunctionDescriptor> map = new HashMap<>();
|
||||
|
||||
PostgisSqmFunctionDescriptors() {
|
||||
PostgisSqmFunctionDescriptors(ServiceRegistry serviceRegistry) {
|
||||
|
||||
map.put(
|
||||
ST_GEOMETRYTYPE.getKey(), new NamedSqmFunctionDescriptor(
|
||||
ST_GEOMETRYTYPE.getKey().getName(),
|
||||
|
|
Loading…
Reference in New Issue