How I can set name of column, like this: "firstName"
Now, when I do:
@Column(name = "firstName")
private String firstName;
Hibernate take/create a column by name "first_name".
How I can set name of column, like this: "firstName"
Now, when I do:
@Column(name = "firstName")
private String firstName;
Hibernate take/create a column by name "first_name".
It depends on NamingStragegy
that is being used for Hibernate configuation (explained here). You probably have camel case to lower case with underscore
strategy defined and hence, Hibernate is converting the column names to lower case with underscores.
If you are using Spring then you can set the naming strategy in application.properties
as explained here.
For Hibernate, this article explains how to set the naming strategy in configuration.