-->
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: Joins
PostPosted: Thu Dec 02, 2004 6:21 am 
Newbie

Joined: Fri Feb 06, 2004 10:16 am
Posts: 7
Hi,

I'm using Hibernate 2.1.6 and I have a problem with joins. I have a mapping where an entity "A" has:

- a one-to-one relationship with the entity "B"
- a one-to-one relationship with the entity "C"

When using the hql question "from A", to list all A entities, there is a lot of sql selects generated. Obviously this is not good from a performance view so my question is if there is another way to write this query to retrieve the relations in just one single join which is easily done with a native sql query? I tried to use proxies setting the class attribute "lazy" to true for B and C but that doesn't help.

I have read the documents about join fetch but I can't get it to wrok. Can someone please help me here and provide me with an example?

Thanks in advance

/B


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.