-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
status: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triaged
Description
When jpa.properties.hibernate.globally_quoted_identifiers is enabled, Hibernate's default naming strategy (Java-like) is now applied instead of Spring's own (snake case). I haven't found anything regarding this new behavior in the release notes, so I guess this change is not intended.
Code example
@Entity
class DemoEntity {
@Id var demoId: UUID? = null
}Generated SQL for findByIdOrNull
Spring Boot 4.0.0:
select de1_0."demoId" from "DemoEntity" de1_0 where de1_0."demoId"=?Spring Boot 3.5.8:
select de1_0."demo_id" from "demo_entity" de1_0 where de1_0."demo_id"=?Stacktrace
[...]
Caused by: org.springframework.dao.InvalidDataAccessResourceUsageException: JDBC exception executing SQL [ERROR: relation "DemoEntity" does not exist
Position: 28] [select de1_0."demoId" from "DemoEntity" de1_0 where de1_0."demoId"=?]; SQL [select de1_0."demoId" from "DemoEntity" de1_0 where de1_0."demoId"=?]
[...]
Caused by: org.hibernate.exception.SQLGrammarException: JDBC exception executing SQL [ERROR: relation "DemoEntity" does not exist
Position: 28] [select de1_0."demoId" from "DemoEntity" de1_0 where de1_0."demoId"=?]
[...]
Caused by: org.postgresql.util.PSQLException: ERROR: relation "DemoEntity" does not exist
[...]
Reproduction
Metadata
Metadata
Assignees
Labels
status: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triaged