How to perform SQL JOINs on a sub-query in Hibernate

Hibernate is a pretty cool ORM framework with lots of features and is probably one of the frameworks, that are used most frequently in Java applications that use a relational database. With the criteria API and the hibernate query language (HQL) it offers both a programmatic and a more SQL-like approach to access data. But unfortunately, both have their limitations and are not as powerful as SQL. In this article, I will show an approach to work around one of this limitations I stumbled upon. weiterlesen…