Field name in entity class is transformed into SQL field name with underscores

I have the following entity class 

Entity@PersistenceUnit(name="default")
@Table(name="hole_section")
public class HoleSection extends Model
{
   
    private Float fromDepth;
    private Float toDepth;
    private Long wellboreId;


But I receive java.sql.SQLException: Invalid object name 'wellbore_id'. How can I prevent an field such as wellboreIdbeing transformed into wellbore_id ?

I am using Spring Boot



accepted
Spring by default uses org.springframework.boot.orm.jpa.SpringNamingStrategy which splits camel case names with underscore. For hibernate v5: use spring.jpa.hibernate.naming.physical-strategy=org.hibernate.‌​boot.model.naming.Ph‌​ysicalNamingStrategy‌​StandardImp in application.properties

No comments:

 Python Basics How to check the version of Python interpreter mac terminal

Popular in last 30 days