public class Wjdc_wj_info extends Model implements Serializable {
@Column
@Id
private Long wj_id;
// 题型列表
@Many(field = "wj_id")
private List<Wjdc_wj_question_base> baseList;
public class Wjdc_wj_question_base implements Serializable
{
private static final long serialVersionUID = 1L;
@Column
@Id
private Integer question_id;
@Column
@Comment("问卷id")
@ColDefine(type = ColType.INT)
private Long wj_id;
// 组合题中的title属性
@Many(field = "question_id")
private List<Wjdc_wj_question_base_title> titleList;
@Many(field = "question_id")
private List<Wjdc_wj_question_base_option> optionList;
Wjdc_wj_info中有Wjdc_wj_question_base列表,many关系,而Wjdc_wj_question_base里还对应Wjdc_wj_question_base_title列表和Wjdc_wj_question_base_option列表。
wjInfoService.insertWith(wjdcWjInfo,"baseList");
Wjdc_wj_info的实体中,已经按照这个层次关系封装好数据,如上方式,可以将Wjdc_wj_question_base的数据插入到对应表中,但是Wjdc_wj_question_base中的Wjdc_wj_question_base_title列表和Wjdc_wj_question_base_option列表,如何同步插入到对应表中?