HHH-14801 Register alternative function names for backwards compatibility

This commit is contained in:
Karel Maesen 2021-08-26 18:30:25 +02:00
parent e185ec8913
commit bc44d65eb3
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ public class PostgisDialectContributor implements ContributorImplementor {
postgisFunctions.asMap().forEach( (key, desc) -> {
functionRegistry.register( key.getName(), desc );
key.getAltName().ifPresent( altName -> functionRegistry.register( altName, desc ) );
key.getAltName().ifPresent( altName -> functionRegistry.registerAlternateKey( altName, key.getName() ) );
} );
}

View File

@ -43,7 +43,7 @@ public class PostgisSqmFunctionDescriptors implements KeyedSqmFunctionDescriptor
true,
StandardArgumentsValidators.exactly( func.getNumArgs() ),
func.getReturnType() != null ? StandardFunctionReturnTypeResolvers.invariant( func.getReturnType() ) :
StandardFunctionReturnTypeResolvers.useArgType( 1 )
null
);
}