Java PO类中有List,Map或者其他的类做成员,mybatis做dao层譬如 Class Student{ int id;
School school; List<String> courses; List<Teacher> teachers; Map<String, List<Integer>> courseScores;
}
其中School, Teacher是其他PO类在mysql设计一个表t_student,那么school, teachers,courses,courseScores对应字段, 如何设计?school和teacher就直接用school_id, teacher_id外键吗?那courses, courseScores呢?
- 2 回答
- 0 关注
- 417 浏览
添加回答
举报
0/150
提交
取消