We have object relationship that basically a common entity as the parent with many child classes which specialize with different attribute. We map those relationship using joined-subclass so parent and each children have their own table. And there are cases where we would like to query just information that is available in parent table only. How can we do that? Currently hibernate will automatically do a join on all the children tables on the query. We are concern on the performance and any limit any database has for the SQL length.
to handle your case (perhaps) more efficiently. There are tradeoffs between this approach and the <joined-subclass> approach. Usually <joined-subclass> is better, since it is less vulnerable to N+1 selects problems.
Co-Author of <a href="http://www.amazon.com/exec/obidos/ASIN/193239415X/ref=jranch-20" target="_blank" rel="nofollow">Hibernate in Action</a>
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Hibernate: Simpler query with many subclasses