jpa One to One mapping

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

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?