发布网友 发布时间:2022-04-26 00:18
共3个回答
懂视网 时间:2022-04-15 03:34
http://note.youdao.com/share/?id=9065b839f2d6b3f1b6310ad9bb92d3f6type=note @Entity@Table(name = RELEASE_INFO_ELEMENT)public class ReleaseInfoElement { @EmbeddedId private PK pk = new PK(); @Column(name = VALUE) private String value; public
http://note.youdao.com/share/?id=9065b839f2d6b3f1b6310ad9bb92d3f6&type=note
@Entity @Table(name = "RELEASE_INFO_ELEMENT") public class ReleaseInfoElement { @EmbeddedId private PK pk = new PK(); @Column(name = "VALUE") private String value; public Long getInfoId() { return pk.infoId; } public void setInfoId(Long infoId) { pk.infoId = infoId; } public Long getParamId() { return pk.paramId; } @Override public String toString() { return "ReleaseInfoElement [infoId=" + pk.infoId + ", paramId=" + pk.paramId + ", value=" + value + "]"; } public void setParamId(Long paramId) { pk.paramId = paramId; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } @Embeddable public static class PK implements Serializable { @Column(name = "INFO_ID") private Long infoId; @Column(name = "PARAM_ID") private Long paramId; public PK() { super(); } } }热心网友 时间:2022-04-15 00:42
您好,很高兴为您解答:热心网友 时间:2022-04-15 02:00
进行面向对象的分析,uer和role之间是双向多对多联系,使用JPA配置如下所示: