error: can not execute. because can not find column for id from entity

解决新增/编辑时com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: error: can not execute. because can not find column for id from entity报错

error: can not execute. because can not find column for id from entity_第1张图片
报错原因:mybatis生成的代码没有@TableId或者说修改实体类时,把@TableId注释删掉了,而实体类必须要有@TableId

所以只要在某个字段上加上@TableId(作为主键)就能解决

你可能感兴趣的:(springcloud,springboot,java)