Is MySQL workbench converting camel case attributes?


I just want to get to know. I declared a attribute name named userId. But it appears in MySQL workbench as user_id. Is this normal?

    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name= "userId")
    private Long userId;


Spring Boot configures SpringPhysicalNamingStrategy by default. If you are using hibernate / JPA, all dots are replaced by underscores and camel cases are replaced by underscores as well. By default, all table names are generated in lower case but it is possible to override that flag if your schema requires it.

In order to override it, We only need to indicate it in our properties file

        physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
        implicit-strategy: org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl

Or, expose them as @Beans :

public PhysicalNamingStrategy physical() {
    return new PhysicalNamingStrategyStandardImpl();

public ImplicitNamingStrategy implicit() {
    return new ImplicitNamingStrategyLegacyJpaImpl();

Answered By – Swapnil Khante

Answer Checked By – Senaida (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.