如果使用Set并将元素Column设置为非null,则hibernate将使用join列和element列作为主键。
例:
@Column(name = "STRINGS", nullable = false)@ElementCollectionprivate Set<String> strings;

如果使用Set并将元素Column设置为非null,则hibernate将使用join列和element列作为主键。
例:
@Column(name = "STRINGS", nullable = false)@ElementCollectionprivate Set<String> strings;