Java EE 7 is around for a few years already, and provides several very useful and long-awaited features, like entity graphs and better support for stored procedures and results mapping. For an overview, have a look at Thorben Janssen’s blog post. The query capabilities were also enhanced, with 3 additional keywords. All of them are available in both JPQL and Criteria API:
- ON keyword to specify conditions for JOINs
- FUNCTION to call arbitrary database function
- TREAT to downcast entities to their specific type
In this post, I’ll focus on the first of them – the ON keyword in JOINs.
(more…)