JPA中核心类型(String、Integer等)集合的映射
程序员文章站
2022-03-02 15:28:48
...
public class SingleChoiceField {
private Long id;
private Set<String> provideValues;
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@CollectionOfElements
@JoinTable(name = "SingleChoiceFieldProvideValue", joinColumns = @JoinColumn(name = "fieldId"))
public Set<String> getProvideValues() {
return provideValues;
}
public void setProvideValues(Set<String> provideValues) {
this.provideValues = provideValues;
}
}
参考资料:
上一篇: NIO
下一篇: (一)NIO与BIO