How to register non-standarized SQL functions manually in Spring Boot application?

前端 未结 3 1501
情深已故
情深已故 2021-01-16 04:49

I\'m using JPA query in my current spring-boot project. How can I add non-standardized SQL functions like GROUP_CONCAT?

Prior, to my previo

3条回答
  •  醉话见心
    2021-01-16 05:01

    You can find a fully functional example in my High-Performance Java Persistence GitHub repository.

    In your case, you don't need to customize the JpaPlatform. That should be set to the HibernateJpaPlatform.

    You can register the MetadataBuilderContributer either programaticallly via the application.properties configuration file:

    hibernate.metadata_builder_contributor=com.vladmihalcea.book.hpjp.SqlFunctionsMetadataBuilderContributor
    

提交回复
热议问题