-->
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.  [ 3 posts ] 
Author Message
 Post subject: How to do inner join while working with set
PostPosted: Fri Oct 12, 2007 11:38 am 
Newbie

Joined: Thu Sep 27, 2007 8:08 am
Posts: 2
Hi,

I am using hibernate 3.1

I have a one-to-many association. I am using a set to represent the same.
By default hibernate retrieves the associated instance using an outer join but i want it to be inner join. How can i achieve this?

if you need any further details i will post them.

Please help me solve this issue?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 15, 2007 8:32 am 
Newbie

Joined: Thu Sep 27, 2007 8:08 am
Posts: 2
Any suggestions please......


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 16, 2007 4:11 pm 
Beginner
Beginner

Joined: Fri Jun 25, 2004 11:47 am
Posts: 34
hi,

Try this:

Code:
String hql = "from Person person " +
                  " inner join [fetch] person.addresses address ";


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