这是表,record表,表示记录表,record_detail 表示明细表,一对多关系
实体类
public class TrRecordEntity implements java.io.Serializable {
/** 培训记录明细集合 */
private List<TrRecordDetailEntity> details;
@OneToMany
@JoinColumn(name="RECORD_ID")
public List<TrRecordDetailEntity> getDetails() {
return details;
}
public void setDetails(List<TrRecordDetailEntity> details) {
this.details = details;
}
}
public class TrRecordDetailEntity implements java.io.Serializable {
/**记录id*/
private java.lang.Integer recordId;
/** 培训记录 */
private TrRecordEntity record;
@Column(name ="RECORD_ID",nullable=false,length=10)
public java.lang.Integer getRecordId(){
return this.recordId;
}
public void setRecordId(java.lang.Integer recordId){
this.recordId = recordId;
}
@ManyToOne
@JoinColumn(name="RECORD_ID",insertable=false,updatable=false)
public TrRecordEntity getRecord() {
return record;
}
public void setRecord(TrRecordEntity record) {
this.record = record;
}
}