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 2 |