mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-22 02:58:05 +00:00
HHH-14801 Register alternative function names for backwards compatibility
This commit is contained in:
parent
e185ec8913
commit
bc44d65eb3
@ -42,7 +42,7 @@ public void contributeFunctions(SqmFunctionRegistry functionRegistry) {
|
||||
|
||||
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() ) );
|
||||
} );
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ private SqmFunctionDescriptor toPGFunction(CommonSpatialFunction func) {
|
||||
true,
|
||||
StandardArgumentsValidators.exactly( func.getNumArgs() ),
|
||||
func.getReturnType() != null ? StandardFunctionReturnTypeResolvers.invariant( func.getReturnType() ) :
|
||||
StandardFunctionReturnTypeResolvers.useArgType( 1 )
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user