Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column ‘XXXXX’
错误信息:
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'plmpermiss0_.created_user_psn_code' in 'field list'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
问题,java在编译的时候识别字段错误:
/**
* 发起人工号
*/
@Column(name = "created_user_psnCode")
private String createdUserPsnCode;
其中psnCode
被解析成psn_code
如上面代码错误所示
解决方法:
该为小写
@Column(name = "created_user_psncode")
private String createdUserPsnCode;