mybatisplus-plus| error: can not execute. because can not find column for id from entity

根据以下博客学习使用 mybatisplus-plus 实现复合主键的应用:

mybatis-plus 复合主键的应用(多主键操作)_mybatisplus复合主键怎么处理_墨鱼梭梭树的博客-CSDN博客

按照相同步骤设置并运行,进行数据更新却出现如下报错:

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

我实在不理解为什么我设置的一模一样却会出现报错,结果发现是我的方法还没有改:

public boolean saveGrade(Grade grade) {
    return saveOrUpdateByMultiId(grade);
}

以前用的是 saveOrUpdate,现在要用 saveOrUpdateByMultiId!


感谢这篇博客里写了要改方法:

mybatis-plus复合主键的使用_mybatisplus双主键_叶儿飞飞的博客-CSDN博客

猜你喜欢

转载自blog.csdn.net/m0_64140451/article/details/130457691