File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
spring-boot-docs/src/main/asciidoc Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -1898,12 +1898,24 @@ The most common options to set are:
1898
1898
In addition all properties in `+spring.jpa.properties.*+` are passed through as normal JPA
1899
1899
properties (with the prefix stripped) when the local `EntityManagerFactory` is created.
1900
1900
1901
+
1902
+
1903
+ [[howto-configure-hibernate-naming-strategy]]
1904
+ === Configure Hibernate Naming Strategy
1901
1905
Spring Boot provides a consistent naming strategy regardless of the Hibernate generation
1902
1906
that you are using. If you are using Hibernate 4, you can customize it using
1903
1907
`spring.jpa.hibernate.naming.strategy`; Hibernate 5 defines a `Physical` and `Implicit`
1904
- naming strategies: Spring Boot configures `SpringPhysicalNamingStrategy` by default. This
1905
- implementation provides the same table structure as Hibernate 4. If you'd rather use
1906
- Hibernate 5's default instead, set the following property:
1908
+ naming strategies.
1909
+
1910
+ Spring Boot configures `SpringPhysicalNamingStrategy` by default. This implementation
1911
+ provides the same table structure as Hibernate 4: all dots are replaced by underscores and
1912
+ camel cases are replaced by underscores as well. By default, all table names are generated
1913
+ in lower case but it is possible to override that flag if your schema requires it.
1914
+
1915
+ Concretely, the `TelephoneNumber` entity will use a `telephone_number` with the default
1916
+ strategy.
1917
+
1918
+ If you'd rather use Hibernate 5's default instead, set the following property:
1907
1919
1908
1920
[indent=0,subs="verbatim,quotes,attributes"]
1909
1921
----
You can’t perform that action at this time.
0 commit comments