From 6ca92418b599239da7c3a4e05fc33b37585da86e Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Fri, 30 Aug 2019 21:56:18 -0700 Subject: [PATCH] Document need to exactly JPA property names Closes gh-17975 --- .../spring-boot-docs/src/main/asciidoc/howto.adoc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc index e3cf7f1da7..ab218c1933 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -1611,6 +1611,15 @@ The most common options to set are shown in the following example: In addition, all properties in `+spring.jpa.properties.*+` are passed through as normal JPA properties (with the prefix stripped) when the local `EntityManagerFactory` is created. +[WARNING] +==== +You need to ensure that names defined under `+spring.jpa.properties.*+` exactly match those expected by your JPA provider. +Spring Boot will not attempt any kind of relaxed binding for these entries. + +For example, if you want to configure Hibernate's batch size you must use `+spring.jpa.properties.hibernate.jdbc.batch_size+`. +If you use other forms, such as `batchSize` or `batch-size`, Hibernate will not apply the setting. +==== + TIP: If you need to apply advanced customization to Hibernate properties, consider registering a `HibernatePropertiesCustomizer` bean that will be invoked prior to creating the `EntityManagerFactory`. This takes precedence to anything that is applied by the auto-configuration.