-->
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.  [ 2 posts ] 
Author Message
 Post subject: [JPA] Possible to make inner join with EntityGraph?
PostPosted: Wed Dec 30, 2015 11:41 am 
Newbie

Joined: Mon Aug 16, 2010 4:47 am
Posts: 4
Hello,

I was looking for the ability to use inner join instead left outer join on the collections fetched using an EntityGraph?

Indeed, when collections specified in my graph are fetched, Hibernate always generates left outer join...

Is this even possible or should I always write my queries without graph?

I read litterature on the Internet and always saw that left outer are used...


Top
 Profile  
 
 Post subject: Re: [JPA] Possible to make inner join with EntityGraph?
PostPosted: Thu Dec 31, 2015 9:55 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
I don't think it's possible because the entity graph fetches additional data.
This is the same with FetchType.EAGER which either uses a LEFT OUTER JOIN or a sub-select.
EAGER fetching cannot work with INNER JOIN because it might filter out the root entity as well.


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

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.