When bootstrapping via the Hibernate native mechanisms, we can easily supply a custom SQL function so that we can further use it in JPQL queries:
However, if we bootstrap via JPA, the EntityManagerFactoryBuilderImpl does not provide a way to pass SQL functions, other than having to extend the Hibernate Dialect.
Therefore, I think we should have a mechanism which is similar to TypeContributions but for SQL functions.
Add a more generic approach to minding the gap between JPA and Hibernate native bootstrap.