-->
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 avoid unnecessary joins with @SecondaryTable
PostPosted: Wed Aug 01, 2007 10:10 am 
Newbie

Joined: Wed Aug 01, 2007 9:33 am
Posts: 3
Hello,

I have an Entity mapped in 2 tables of my database.
Is there a way to disable unnecessary joins using @SecondaryTable when we just wanna count all the records? Considering that both tables has exact same number of records it is unnecessary to do a any join to just count it causing loss in speed.

Another point is when we wanna bring only one field. If you wanna retrieve the Name based on the ID, it shouldn't join either since the ID is on both tables.

If anyone can help me with this I would appreciate.

Thanks,
Thiago


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 03, 2007 1:42 pm 
Newbie

Joined: Wed Aug 01, 2007 9:33 am
Posts: 3
No one knows a trick to this?

If this isn't possible yet, it should be implemented in next versions.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 03, 2007 2:12 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Looks like we have a volunteer here.

_________________
Emmanuel


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.