-->
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.  [ 4 posts ] 
Author Message
 Post subject: Table-per-subclass strategy
PostPosted: Fri Dec 17, 2004 12:04 pm 
Regular
Regular

Joined: Fri Mar 26, 2004 11:45 am
Posts: 75
It has been suggested on this forum to use the table-per-subclass (TPS) strategy in my application design (see http://forum.hibernate.org/viewtopic.ph ... highlight=).

I have several questions about this strategy, for which I didn't find the answers in the Hibernate book:

1. TPS strategy performance may be unacceptable if there are multiple subclasses. However, sometimes the superclass table may contain a field, which tells you what subclass to use. Is it possible to configure Hibernate in such a way that it joins the superclass table with specific subclass table(s) instead of joining ALL of them with the superclass table?

2. Is it possible to declare the subclass table in a separate .hbm.cfg file and then reference it from inside the superclass mapping file? It is rather inconvenient having to put all subclasses or joined-subclasses mappings inside the superclass mapping file itself.

Thanks.

Alec


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 17, 2004 12:12 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
Quote:
1. TPS strategy performance may be unacceptable if there are multiple subclasses. However, sometimes the superclass table may contain a field, which tells you what subclass to use. Is it possible to configure Hibernate in such a way that it joins the superclass table with specific subclass table(s) instead of joining ALL of them with the superclass table?

Hibernate 3

http://www.hibernate.org/200.html
Quote:
and table-per-subclass inheritance with a discriminator column



Quote:
2. Is it possible to declare the subclass table in a separate .hbm.cfg file and then reference it from inside the superclass mapping file? It is rather inconvenient having to put all subclasses or joined-subclasses mappings inside the superclass mapping file itself.


http://www.hibernate.org/hib_docs/refer ... dularfiles



generally, all you need is read the docs ;)

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 17, 2004 12:19 pm 
Regular
Regular

Joined: Fri Mar 26, 2004 11:45 am
Posts: 75
Thank you for the great answer!


Top
 Profile  
 
 Post subject: the page can not be found now
PostPosted: Fri Mar 24, 2006 1:47 pm 
Newbie

Joined: Fri Mar 24, 2006 1:39 pm
Posts: 1
when I visit the link http://www.hibernate.org/200.html
the page shows :
Not found. [Status 404]
Program resumed. [Status 111]

Can you tell me the new address of it, thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.