O'Reilly logo

EJB 3.1 Cookbook by Richard M. Reese

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

Controlling the Object-Relationship Mapping (ORM) process

Object-Relationship Mapping (ORM) is concerned with persisting an object to a database. There exist a number of annotations which provide information to guide the mapping process. The uses of these annotations are illustrated in this recipe.

Getting ready

When we persist an entity it is sometimes desirable to exercise more control over which table in a database should be used. In addition, we may want to specify the field names to use within the table. ORM allows us to control these factors by using the @Table and @Column annotations. The use of these annotations will be demonstrated by expanding upon the previous recipe and augmenting the EntityBeanApplication application.

How to do it... ...

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