Merge pull request #12320 from anuragkumawat/JAVA-11558
JAVA-11558 Update article - Hibernate 5 Naming Strategy Configuration
This commit is contained in:
commit
7c6cfe56e9
|
@ -41,7 +41,7 @@ public class CustomPhysicalNamingStrategy implements PhysicalNamingStrategy {
|
||||||
final String newName = identifier.getText()
|
final String newName = identifier.getText()
|
||||||
.replaceAll(regex, replacement)
|
.replaceAll(regex, replacement)
|
||||||
.toLowerCase();
|
.toLowerCase();
|
||||||
return Identifier.toIdentifier(newName);
|
return Identifier.toIdentifier(newName, identifier.isQuoted());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ hibernate.dialect=org.hibernate.dialect.H2Dialect
|
||||||
|
|
||||||
hibernate.show_sql=false
|
hibernate.show_sql=false
|
||||||
hibernate.hbm2ddl.auto=create-drop
|
hibernate.hbm2ddl.auto=create-drop
|
||||||
|
hibernate.globally_quoted_identifiers=true
|
||||||
|
|
||||||
hibernate.physical_naming_strategy=com.baeldung.hibernate.namingstrategy.CustomPhysicalNamingStrategy
|
hibernate.physical_naming_strategy=com.baeldung.hibernate.namingstrategy.CustomPhysicalNamingStrategy
|
||||||
hibernate.implicit_naming_strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyJpaCompliantImpl
|
hibernate.implicit_naming_strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyJpaCompliantImpl
|
Loading…
Reference in New Issue