hibernate Hibernate Entity Relationships using Annotations


@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.