-->
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: Totally confused about find()
PostPosted: Fri Apr 06, 2007 11:33 am 
Senior
Senior

Joined: Mon Jul 24, 2006 8:43 am
Posts: 160
Hi,
My Address entity contains no foreign keys, there are two 1:1 relationships pointing to it i.e. the other tables have the foreign key which point to the Address table. These two other Entities (Person and Company) are involved in other relationships to other entities nothing to do with Address.

When I invoke entityManager.find() for an Address entity, Hibernate generates a huge SQL statement. Ìt is a huge Join with 11 sub selects and a selection from 27 tables in total. This seems far too much!

I have no CASCADE option set for any of the relationships?

Why is hibernate doing this or what are my doing wrong?
Any help, advice greatly appreciated.
Regards


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.