Skip to content

4.0.0-RC2 changes database column auto-naming for fields with numbers #47998

@bramvonk

Description

@bramvonk

Using spring-boot-jpa in spring boot 3, an entity with field named columnWith1Number got auto-named column_with1number in the database.

After upgrading to spring boot 4.0.0-RC2, I found out that the auto-naming behaves differently, generating the database column named column_with1_number.

Example application with a test that tests for column naming:

https://github.com/bramvonk/bugreport-column-naming-spring-boot-4-issue

The spring boot 3 application builds 'correctly' with auto-created table:
Hibernate: create table example_entity (id integer not null, column_with1number varchar(255), primary key (id))

but after upgrading to spring boot 4 via this commit it fails due to the table being generated as:
Hibernate: create table example_entity (id integer not null, column_with1_number varchar(255), primary key (id))

I couldn't find anything about this in either Spring Boot 4 Migration Guide or the Hibernate 7.0 Migration Guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: external-projectFor an external project and not something we can fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions