anthony wrote:
be sure to understand implicit and explicit polymorphic query...
I see this article 
http://www.hibernate.org/hib_docs/reference/en/html/queryhql.html.
But I don't know what benefit using subclass.  The element 
Code:
polymorphism (optional, defaults to implicit): Determines whether implicit or explicit query polymorphism is used.
  decide whether I will use polymorphism.  It means that if I set the polymorphism to false, hibernate will query parent object only without children. If I set the plymorphism to true,hibernate will query all the object (parent and children).  
 But the problem is that I don't know what situation that I need query all parent and children object.  Could you give me an example ? Thks!