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

Chapter 6. More on Mappings

In Chapter 5, you learned the fundamental concepts behind Hibernate mappings. In this chapter, we will look at some other issues in mapping definitions, including the mapping of collections and associations. We will see how persistent classes can be divided into value types and entity types, and how these may affect the mapping definition. As you probably know, there are different types of object associations: one-to-one, one-to-many, many-to-one, and many-to-many. The many side of the relationship is represented by an object of a java.util.Collection or a java.util.Map.

The mapping definitions introduced in this chapter are explained with simple examples from the educational system application. Let's begin with the ...

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