这是我的mysql专栏
staffGroup varchar(255) utf8_general_ci
这是我的实体映射
@Column(name = "staffGroup")
private String staffGroup;
这是我的标准
public List<Staff> getStaff() {
Session session = sessionFactory.getCurrentSession();
return (List<Staff>) session.createCriteria(Staff.class).list();
}
hibernate显示此错误消息
o.h.engine.jdbc.spi.SqlExceptionHelper : Unknown column 'this_.staff_group' in 'field list'
答案 0 :(得分:1)
application.properties
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl