Learn to use mybatisplus-plus to implement the application of composite primary keys according to the following blog:
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: