Uploaded image for project: 'Hibernate ORM'
  1. HHH-12589

Add support for registering custom SQL functions when bootstrapping via JPA

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2.17, 5.3.0.Final
    • Fix Version/s: 5.2.18, 5.3.1
    • Component/s: hibernate-core
    • Labels:
      None
    • Last commented by a user?:
      true
    • Sprint:

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              mih_vlad Vlad Mihalcea
              Reporter:
              mih_vlad Vlad Mihalcea
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: