0
增量数据,我想添加一个用户定义的列,这将在新的记录插入自动递增,应该怎么做呢?所以它运行在h2上,mysql如何自动对新记录插入
@Entity public class Parent {
@OneToMany List<Child> children;
}
@Entity public class Child {
int sortOrder;
}
e.g. Parent1 has Child{1, 2, 3}
Parent2 has {1, 2}
注意:每个Parent中的值需要自动递增,而不是外部。