The mapping of associations between entity classes and the relationships between tables is the soul of ORM. Following are the four ways in which the cardinality of the relationship between the objects can be expressed. An association mapping can be unidirectional as well as bidirectional.
Mapping type | Description |
Many-to-One | Mapping many-to-one relationship using Hibernate |
One-to-One | Mapping one-to-one relationship using Hibernate |
One-to-Many | Mapping one-to-many relationship using Hibernate |
Many-to-Many | Mapping many-to-many relationship using Hibernate |