我正在使用 Spring MongoDB,现在我遇到了将值插入数组列表的问题。这是我的 POJO 类结构...
public class Search implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private String id;
private String searchkey;
private ArrayList<Lead> leads;
}
“Lead”是另一个 POJO 类,就像......
public class Lead implements Serializable {
private static final long serialVersionUID = 1L;
private String leadtext;
private String address;
private ArrayList<History> trackrecords;
}
“历史”是另一个 POJO 类,就像..
public class History implements Serializable {
private static final long serialVersionUID = 1L;
private String id;
private String changedfield;
private String oldvalue;
private String newvalue;
}
问题是我想在更新一条线索时将数据插入跟踪记录。春天的mongotemplate有可能吗??如果可能的话,请帮助我。先感谢您