jpa One to One mapping

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9

Parameters

AnnotationPurpose
@TableGeneratorSpecifies generator name and table name where generator can be found
@GeneratedValueSpecifies generation strategy and refers to name of generator
@OneToOneSpecifies one to one relationship between employee and desk, here Employee is owner of relation
mappedByThis element is provided on reverse side of relation. This enables bidirectional relationship


Got any jpa Question?