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

Learn to use mybatisplus-plus to implement the application of composite primary keys according to the following blog:

Application of mybatis-plus composite primary key (multiple primary key operation)_how to deal with mybatisplus composite primary key

Follow the same steps to set up and run, but the following error occurs when performing data update:

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

I really don't understand why an error occurs when I set exactly the same, but it turns out that my method has not been changed:

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

SaveOrUpdate was used before, but now saveOrUpdateByMultiId is used!

 


Thanks to this blog for writing the method to be changed:

The use of mybatis-plus composite primary key_mybatisplus dual primary key_Ye Erfeifei's Blog-CSDN Blog

Guess you like

Origin blog.csdn.net/m0_64140451/article/details/130457691