Annotation | Purpose |
---|---|
@TableGenerator | Specifies generator name and table name where generator can be found |
@GeneratedValue | Specifies generation strategy and refers to name of generator |
@OneToOne | Specifies one to one relationship between employee and desk, here Employee is owner of relation |
mappedBy | This element is provided on reverse side of relation. This enables bidirectional relationship |