목차

@Embeddable / @Embedded

@Embeddable

@Embeddable 
public class EmploymentPeriod {
  @Column(name="START_DATE")
  private java.sql.Date startDate;
 
  @Column(name="END_DATE")
  private java.sql.Date endDate;
  ....
}

@Embedded

  @Embedded
  private EmploymentPeriod period;
 
  // or
 
  @Embedded
  @AttributeOverrides({
    @AttributeOverride(name="startDate", column=@Column(name="START_DATE")),
    @AttributeOverride(name="endDate", column=@Column(name="END_DATE"))
  })
  private Period employmentPeriod;

참고