-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Inheritance doubt
PostPosted: Thu Jun 18, 2009 11:46 am 
Newbie

Joined: Thu Jun 18, 2009 11:25 am
Posts: 1
Hi all!!!

I have an doubt; I hope you can help me.

I have a class hierarchy. I have an abstract class called Document (mapping a table called DOCUMENT). I also have other six class, called Document1, Document2, Document3 (...) Document6, that are subclasses from Document (each one of these classes have their own table). When I perform a HQL query for Document (example, from Document (...)) Hibernate translates to SQL whose from clause contains the subclasses tables, and, consequently, perform a join between the Document table and the others.

My problem is: I am interested only in 2 classes, for example, Documento 1 and Document 3. So, it is possible to perform a query for Document and the HQL be translated to a such way that the other classes are not being included in the SQL?

Thanks for the attention,

André Thiago.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.