title: How to join unrelated entities with the JPA Criteria API
body: <p>Two database tables have a foreign key relationship.</p>
  
  <p>They are mapped to two entities <strong>A</strong>  and <strong>B</strong> by JPA, but the join columns are manually removed from the entities, so in JPA world classes <strong>A</strong> and <strong>B</strong> are not related and you cannot navigate from one to the other through a field/property.</p>
  
  <p>Using the JPA Criteria API, is it possible to create a query which joins the two tables?</p>
  
  <p>All examples I found on internet uses the join column to achieve the goal, but, as stated above, it was removed from the code because most time I'm not interested in the relationship between <strong>A</strong> and <strong>B</strong> and I'm afraid about possible overhead.</p>