So far in this chapter, you've learned about mapping components. A component is a property of a persistent class represented as another persistent class, which is stored with its owner class in one table. Instead of persisting associated classes in one table, each class may be persisted in its own table. This approach is the subject of this next section. We'll begin by looking at different types of object associations and how they are represented in the Java object model.
Suppose there are two persistent classes called
B. The relationship of
B is called one-to-one if any instance of
A is associated with only a single instance of
B, and no more. A one-to-one association is always presented as an instance ...