-->
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: Hibernate makes unneeded outer joins
PostPosted: Thu Oct 18, 2007 5:42 am 
Newbie

Joined: Wed Apr 11, 2007 4:04 am
Posts: 2
I have a very simple hibernate mapping:
- LegalPerson
- Owner extends LegalPerson
- TabOwner extend Owner

Note that Owner is NOT abstract, so there can be Owner instances and TabOwner instances
They all are mapped using the table-per-sublcass strategy (joined-subclass)

Everyting works very well, but I see that Hibernate makes unneeded outer joins when querieing for Owners:

the HQL 'from Owner' gives the following query (simplified)
select ... from Owner inner join Legal_Person ... LEFT OUTER JOIN Tab_Owner ...

which is correct (the HQL should return all instances of Owner, including subclasses of owner).

but the HQL 'from Owner o where o.class=Owner' still creates an Outer join with Tab_Owner , which is completely unnecessary.

Since we have milions of records on our table, we really want to tune this...


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.