hibernate Hibernate Entity Relationships using Annotations

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!


@OneToOneSpecifies a one to one relationship with a corresponding object.
@OneToManySpecifies a single object that maps to many objects.
@ManyToOneSpecifies a collection of objects that map to a single object.
@EntitySpecifies an object that maps to a database table.
@TableSpecifies which database table this object maps too.
@JoinColumnSpecifies which column a foregin key is stored in.
@JoinTableSpecifies an intermediate table that stores foreign keys.

Got any hibernate Question?