-->
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: There are generated left outer joins instead of inner joins
PostPosted: Thu Nov 24, 2005 5:51 am 
Newbie

Joined: Thu Nov 24, 2005 5:24 am
Posts: 1
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
3.0.5

I have problem that left outer joins are generated instead of inner joins. I have following 4 objects:

Party - AccountPartyRelation - Account - AccountYTurnOver

I'm accesing AccountPartyRelations from Party and I want that all accounts are loaded at the same time. I'am not using Query but traversing through associations defined in mapping files. I have correct mapping files, changed lazy to false, used fetch="join" and Hibernate generates corretly joins between AccountPartyRelation-Account-AccountYTurnOver. Join between AccountPartyRelation-Account is correctly inner join but join between Account-AccountYTurnOver is left outer join. I have correctly set the one-to-one association between Account-AccountYTurnOver to not-null="true" so there is no problem to generate inner join.

I have found out that the problem is in OuterJoinLoader.getJoinType(boolean nullable, int currentDepth) where is comment

//TODO: this is too conservative; if all preceding joins were
// also inner joins, we could use an inner join here

I have changed the code that it does not check if currentDepth is 0 for inner joins but for our production I need some more official patch to Hibernate.

First: I don't know if it is really a bug or it belongs to wish list. Should I put it into JIRA?
Second: Is there any possibility that it could be fixed/implemented until the end of year 2005?


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.