当前使用版本(必填,否则不予处理)
3.4.0
该问题是如何引起的?(确定最新版也有问题再提!!!)
@TableName注解没有起作用。
重现步骤(如果有就写完整)
设置了表前缀t_,使用TableName指定了表的名字后,查询还是有t_前缀,导致查询表命不存在。
报错信息
Error querying database. Cause: java.sql.SQLSyntaxErrorException: Table database.t_article' doesn't exist
The error may exist in net.../mapper/ArticleMapper.java (best guess)
The error may involve defaultParameterMap
The error occurred while setting parameters
SQL: SELECT count(0) FROM t_article WHERE (title LIKE ?)
Cause: java.sql.SQLSyntaxErrorException: Table 'database.t_article' doesn't exist
Comment From: qmdx
请给出你的重现 demo
Comment From: abc136609517
检查一下mybatis plus的yml文件的配置, 有没有设置全表统一前缀
Comment From: huayanYu
无最新回复,建议检查配置。~