In this chapter, we discussed some of the more advanced concepts behind mapping. We started our discussion by introducing the
<component> element to map a class property which is represented as an object of the other class in a single table.
We continued with different kinds of object associations and their mapping. In practice, there are four kinds of associations: one-to-one, one-to-many, many-to-one, and many-to-many. For each kind of association, a corresponding element exists in Hibernate mapping. A relationship is called bidirectional, if we can reach one side of the association from the other side, and vice versa. In contrast, a relationship is called unidirectional when we can navigate the relationship in one direction only.