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.
|