-->
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: Joined-subclass retrieval and scaling
PostPosted: Wed Apr 14, 2004 12:31 pm 
Newbie

Joined: Wed Apr 14, 2004 12:18 pm
Posts: 2
Location: Greenwich, CT
Hi, all- I was playing around with joined-subclasses, and I was very happily surprised to see that
Code:
session.get(MySuperClass.class,  someSubclassInstanceId);
returned an instance of the correct subclass. I was just wondering what sort of performance I could expect from this method of retrieval as a) the number of persisted instances and b) the number of joined subclasses grows.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 14, 2004 6:46 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Well basically you will get a join for every subclass of the class queried. The number of returned rows will be the number of persisted instances. (Both provided you don't outer join fetch any associations)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 15, 2004 9:48 am 
Newbie

Joined: Wed Apr 14, 2004 12:18 pm
Posts: 2
Location: Greenwich, CT
Thanks for the quick response... Is there some way (within Hibernate) to use a discriminator or the like to make sure that Hibernate only performs the join for the appropriate subclass?


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.