-->
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: Does join fire less queries than not using joins at all?
PostPosted: Mon Aug 08, 2005 7:32 pm 
Newbie

Joined: Fri Jul 15, 2005 6:50 pm
Posts: 3
Location: Bay Area, California,USA
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp


What is the advantage of using joins in the HQL criteria object?
e.g I have a employee and address objects. An employee can have multiple addresses.

Would the number of queries fired to get the address association be less if I add join in the criteria?


Top
 Profile  
 
 Post subject: Re: Does join fire less queries than not using joins at all?
PostPosted: Mon Aug 08, 2005 7:47 pm 
Expert
Expert

Joined: Thu Dec 04, 2003 12:36 pm
Posts: 275
Location: Bielefeld, Germany
ujjwalak wrote:
Would the number of queries fired to get the address association be less if I add join in the criteria?

This depends on your fetching strategy.

Read 16.5. Dynamic association fetching (documentation):
http://www.hibernate.org/hib_docs/v3/re ... icfetching

As well as 20.1. Fetching strategies (documentation):
http://www.hibernate.org/hib_docs/v3/re ... e-fetching


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.