How to order entity subclasses by their class type using JPA and Hibernate

Introduction In this article, we are going to see how to order entity subclasses when executing a JPQL query with Hibernate.