'Hibernate issue with unquoted strategy

Starting from 5.5.3.Final, Hibernate-core changes the unquotedCaseStrategy to UPPER (while the original value is MIXED).

public class IdentifierHelperBuilder {
    private IdentifierCaseStrategy unquotedCaseStrategy = IdentifierCaseStrategy.UPPER;
    private IdentifierCaseStrategy quotedCaseStrategy = IdentifierCaseStrategy.MIXED;

Our project uses following url (with Spring boot) to access the MariaDB. After changing to hibernate-core 5.5.3.Final, our project cannot access the MariaDB correctly. During the investigation, I found that catalog name WebServiceDB will be treated as unquoted and UPPER case WEBSERVICEDB will be used as the catalog (WebServiceDB will be used before hibernate-core 5.5.3.Final) due to the unquotedCaseStrategy change.

spring:
  datasource:
    url: jdbc:mysql://1.1.1.1:3306/WebServiceDB

I want to make the catalog to be quoted and use quotedCaseStrategy, following configurations had been tried and did not work. Could you please help me? Thanks a lot.

url: jdbc:mysql://1.1.1.1:3306/"WebServiceDB"
url: jdbc:mysql://1.1.1.1:3306/[WebServiceDB]


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source