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呢?
DIEA
大话西游666
哈士奇WWW
随时随地看视频慕课网APP