In Hibernate reference chapter 10.6:
a query like "  from eg.Cat as cat " returns not only Cat , it returns also subclasses of Cat.
and :
http://forum.hibernate.org/viewtopic.ph ... hism+query
How to use these subclasses that are returned base on polymorphism ? If type cast cannot be used in HQL.
There must be a way to use them, I will like to know "HOW".
I have a case here:
 Class Parent
         set = children : a collection of Child
 Class Child
   
          joined subclass  Person 
          joined subclass  Company
 my incomplete query:
 Select parent.key 
 from       Parent  parent 
               inner join fetch parent.children child
 ==>here, how to address Person that is returned by polymorphism ?
 where parent.property1 = 100 and
           child.property2     = 200 and
 ==>here, how to include only Person with property3 = 300         
Please help and I am happy for any ideas and response.
/Kwan