@Column(name="DateOfBirth")
private Date dateOfBirth;
我特别需要上面的代码来创建一个名为“DateOfBirth”的列,而 Hibernate 为我提供了一个名为 date_of_birth 的列。我怎样才能改变这个?有 web.xml 属性吗?我遇到了 DefaultNamingStrategy 和 ImproveNamingStrategy,但不确定如何指定其中之一。
最佳答案
尝试将其放入
应用程序属性
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
关于java - hibernate列名问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46789708/