Enterprise Java Development@TOPIC@

Chapter 61. Many-to-One Relationships

61.1. Many-to-One: Uni-directional
61.2. Summary

Figure 61.1. Many-to-One Uni-directional

Many-to-One Uni-directional

Uni-directional

Only one side ("owner") knows of the relationship

  • Uses the @ManyToOne annotation

  • Defines mapping to database

    • Uses either @JoinColumn or @JoinTable

Bi-directional

Same as One-to-Many Bi-directional