我想知道如果更新 oneToMany 关系是否会更改域版本。例如,有一个与 Addresses 有 OneToMany 关系的 User 实体。那么如果我更新地址列表会对用户版本有影响吗?
@Entity public class User {
@Id @Column(name = "id")
@GeneratedValue
private Long id;
@OneToMany (mappedBy = "document")
public Set<Addresses> userAddresses;
@Version @Column(name="OPTLOCK")
public Integer getVersion() { ... }
}