### Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key,
value ) VALUES ( 'value',
'02771668-5485-4bc7-b75a-6702ed520b7e' )' at line 1
### The error may exist in tester/ConfigPlusMapper.java (best guess)
### The error may involve tester.ConfigPlusMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO via_config ( key, value ) VALUES ( ?, ? )
### Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key,
value ) VALUES ( 'value',
'02771668-5485-4bc7-b75a-6702ed520b7e' )' at line 1
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key,
value ) VALUES ( 'value',
'02771668-5485-4bc7-b75a-6702ed520b7e' )' at line 1
at tester.ApplicationTest.tesConfigPlusValueAndDelete(ApplicationTest.java:92)
Caused by: java.sql.SQLSyntaxErrorException:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key,
value ) VALUES ( 'value',
'02771668-5485-4bc7-b75a-6702ed520b7e' )' at line 1
at tester.ApplicationTest.tesConfigPlusValueAndDelete(ApplicationTest.java:92)
当前使用版本 3.4.3.4
当前环境信息 例如: Java8 + Mysql8
描述bug现象 对于使用关键字作为字段名的情况,又同时指定为@TableId时,对于@TableField的定义会被忽略
提供问题复现步骤
创建表
定义对象
定义Mapper
测试
输出