帮助为下一个对象创建表模型。假设有一个类
public class Class1 implements Serializable {
private Long id = null;
private String name = null;
private Set <Class2> transaction = new HashSet <Class2> ();
get and set ...
}
public class Class2 implements Serializable {
private Long class1Id = null;
private String field1 = null;
private Class1 class1 = null;
get and set ...
}
一对多。该表显示id、name、field1。1,“约翰”,asd;1,“约翰”,2;.... 像这样的东西。举例说明什么可以是什么?