I\'m using Hibernate 3.1.1, and in particular, I\'m using HQL queries.
According to the documentation, Hibernate\'s queries are polymorphic:
A
JPA 2 (Hibernate 3.5) adds support for non-polymorphic queries, this is very similar to Hibernates .class property (as Bozho answered above) but it is not Hibernate specific. This is done using the TYPE operator. As in
Select b from Book b where TYPE(b) = Book
You can read more about here it in my blog
Eyal