本文主要是介绍MybatisPlusException: error: can not execute. because can not find column for id from entity,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
问题
使用mybatis-plus时 ,使用了方法saveOrUpdate
,出现问题
com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: error: can not execute. because can not find column for id from entity!
解决
可以看到:
can not find column for id from entity!
所以,需要对实体类 的主键 添加注解 @TableId
此时再次运行,一切ok。
这篇关于MybatisPlusException: error: can not execute. because can not find column for id from entity的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!