title: How to get all objects of concrete class in table-per-hierarchy with hibernate?
body: <p>I'm developing a web application with Netbeans (Maven Web Application) using Spring MVC and Hibernate. I have an abstract class (User) with multiple concrete classes (Parent, Child, etc.). I chose for a table-per-hierarchy construction so that I have 1 tables with all the objects of these concrete classes. But I can't find a way to get all the objects of a certain concrete class. I'm getting following error:</p>
  
  <p>java.lang.IllegalArgumentException: Type specified for TypedQuery [domain.Parent] is incompatible with query return type [class domain.User]</p>
  
  <p>Anyone who knows how I can cast these objects?</p>