O'Reilly logo

Spring Persistence with Hibernate by Ahmad Seddighi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

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.

Hibernate ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required