The Java EE 6 Tutorial, Volume I

Navigating to Single-Valued Relationship Fields

Use the JOIN clause statement to navigate to a single-valued relationship field:

 FROM Team t JOIN t.league l
 WHERE = ’soccer’ OR =’football’

In this example, the query will return all teams that are in either soccer or football leagues.