Annotation Interface Parent
Specifies that the annotated field or property of an embeddable
class is a reference to the owning entity.
@Entity
class Course {
@Id @GeneratedValue id;
@Embedded CourseCode code;
...
}
@Embeddable
class CourseCode {
@Parent Course course;
String prefix;
String numericSuffix;
}