Currently I'm mapping new JPA entities to an old database. The column names in the database have column names separated with underscore like 'my_column_name'.
The problem is that JPA defaults to using with camel case.
// Will be 'myColumnName' in queries and generated databases
private String myColumnName;
I know it's possible to add @Column(name="..") or @JoinColumn(name="...") on the properties - but that means i have to add it to every single property in all entities.
@Column(name = "my_column_name")
private String myColumnName;
Is it possible to change the default behavior of JPA to use 'my_column_name' instead of 'myColumnName'?