| 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:
metadataBuilder.applySqlFunction(
"group_concat",
new StandardSQLFunction( "group_concat", StandardBasicTypes.STRING )
);
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. |