-->
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.  [ 4 posts ] 
Author Message
 Post subject: Inner join insted of outer join
PostPosted: Fri Nov 07, 2003 6:18 am 
Newbie

Joined: Tue Oct 14, 2003 12:02 pm
Posts: 11
Location: Romania
Hi *,

I have the following situation:
There is a Person entity which has a many-to-one relation to a Country entity. When I load a Person I can see that Hibernate generates an outer join for gathering the Country info. Is it possible to tell somehow Hibernate (not-null attribute or something) that it should not generate an outer join but an inner join when retrieving the country info?

10x,

Florin


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 07, 2003 6:21 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Use "inner join fetch" in the HQL.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 07, 2003 6:24 am 
Newbie

Joined: Tue Oct 14, 2003 12:02 pm
Posts: 11
Location: Romania
gavin wrote:
Use "inner join fetch" in the HQL.


ok. but I was wondering if Hibernate can do this by itself when making an

session.load(Person.class, PERSON_ID);

and the id_country attribute in the Person table has a NN constraint.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 10, 2003 3:42 am 
Newbie

Joined: Tue Oct 14, 2003 12:02 pm
Posts: 11
Location: Romania
gavin wrote:
Use "inner join fetch" in the HQL.



ok gavin, but I was wondering if Hibernate can do this by itself when making an

session.load(Person.class, PERSON_ID);

and the id_country attribute in the Person table has a NN constraint.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.