JPA/Hibernate query with class name?
- by Petteri Hietavirta
In this example com.test.Cat extends com.test.Animal and there is no field DB in CAT table of com.test.Cat explicitly defining its type (it wasn't me).
When I query my animals from DB I get a collection of Animals.
It is possible to sort them by class name:
order by r.class
but is there a way to use class name as a criteria? For example I…