Ability to register SQL functions at runtime

Description

In my application I have a mechanism that allows third party code to extend the default behavior allowing to register custom SQL functions at runtime. But, it seems that since this changeset[1] was introduced, I can't register SQL functions in that way anymore.

As far as I know, the current options to register a custom SQL function in Hibernate are the following ones:

  • Create a custom dialect and register the functions on the constructor.

  • Get the Configuration object when the app starts and register the SQL functions.

  • Use a MetadataBuilderInitializer

But none of this options allows to add SQL functions after Hibernate has been set up.

[1] https://github.com/hibernate/hibernate-orm/commit/52589379e1a93c372a323a9334d12b2f31dc0a7a

Environment

None

Assignee

Unassigned

Reporter

Carlos Aristu

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.0.0.Final

Components

Affects versions

Priority

Major
Configure