In real-world applications, domain entities have relationships between them. In this section, we look at how Roo simplifies creating a many-to-one (or one-to-one) relationship between JPA entities.
The following figure shows the relationship between the
FLIGHT_DESC_TBL tables, which we will use as a reference to model our many-to-orelationship:
In the given figure, the
FLIGHT_TBL table contains scheduled flight details and the
FLIGHT_DESC_TBL table contains details of all the flights that an airline offers. Each record in the
FLIGHT_TBL table refers to exactly one ...