哪位大哥知道使用ibatis如何在Student.xml增加另外一张表Course的字段course_id?哪位大哥知道ibatis中怎么Student.xml中怎么加入Course表的course_id字段呀,数据库中Student表并没有course_id字段,对应的Student.

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/27 15:39:36
哪位大哥知道使用ibatis如何在Student.xml增加另外一张表Course的字段course_id?哪位大哥知道ibatis中怎么Student.xml中怎么加入Course表的course_id字段呀,数据库中Student表并没有course_id字段,对应的Student.

哪位大哥知道使用ibatis如何在Student.xml增加另外一张表Course的字段course_id?哪位大哥知道ibatis中怎么Student.xml中怎么加入Course表的course_id字段呀,数据库中Student表并没有course_id字段,对应的Student.
哪位大哥知道使用ibatis如何在Student.xml增加另外一张表Course的字段course_id?
哪位大哥知道ibatis中怎么Student.xml中怎么加入Course表的course_id字段呀,数据库中Student表并没有course_id字段,对应的Student.java需要加入courseId属性吗?前提是数据库中的Student表不能增加course_id字段,在Student.xml中加入 行吗,Student.java中怎么处理?
涉及到的StudentDao,StudentService,StudentAction需要做些什么修改呀,要增加方法吗,

哪位大哥知道使用ibatis如何在Student.xml增加另外一张表Course的字段course_id?哪位大哥知道ibatis中怎么Student.xml中怎么加入Course表的course_id字段呀,数据库中Student表并没有course_id字段,对应的Student.
加入
然后有resultMap相关结果集的查询要关联Course表,除了查出Student表中字段再多查出一项CourseId就可以了
Student.java中多加一个字段,生成Getter,Setter方法