Home > Back-end >  MyBatis mapping file configuration class member List <map <> type
MyBatis mapping file configuration class member List <map <> type

Time:11-22

Such an entity class
https://img-ask.csdn.net/upload/202009/14/1600088640_166144.jpg
But in the end of the courses and corresponding grades (course) mapping in Mybatis configuration file how to write a mapping relationship between resultMap
This is the database table

Student (id, name, email_address, gender, age)

Course (id, name, classroom_address)

Sudent_course_relationship (course_id, student_id, mark)

CodePudding user response:

The standard many-to-many mapping

https://www.yiibai.com/mybatis/mybatis-many2many.html
  • Related