O'Reilly logo

Beginning Java EE 7 by Antonio Goncalves

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 5

image

Object-Relational Mapping

In the previous chapter I went through the basics of object-relational mapping (ORM), which is basically mapping entities to tables and attributes to columns. I also introduced configuration by exception which allows the JPA provider to map an entity to a database table using all the defaults. But defaults are not always suitable, especially if you map your domain model to an existing database. JPA comes with a rich set of metadata so you can customize the mapping.

In this chapter I cover elementary mapping, but I also concentrate on more complex mappings such as relationships, composition, and inheritance ...

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