-->
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.  [ 6 posts ] 
Author Message
 Post subject: Is there a way? O/R mapping
PostPosted: Mon Nov 28, 2005 4:17 pm 
Senior
Senior

Joined: Tue Sep 13, 2005 2:01 am
Posts: 137
Suppose I have a class hierarchy:

A
|--- B
|--- C
D
|--- E
|--- F
|--- G
|--- H

I like to use Table-per-class. But I like F and its subclasses(G,H,subtree) to be in one table so that I can avoid too many small tables.

Is there a way?

Thanks.
Dave


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 28, 2005 4:19 pm 
Senior
Senior

Joined: Tue Sep 13, 2005 2:01 am
Posts: 137
all spaces were ignored above.
G and H are subclasses of F.

A
|--- B
|--- C
D
|--- E
|--- F
-----|--- G
-----|--- H


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 28, 2005 4:43 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Go to the regular User forum.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 28, 2005 5:37 pm 
Senior
Senior

Joined: Tue Sep 13, 2005 2:01 am
Posts: 137
I think this topic is EJB related. I am wondering if there is any annotation for this.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 29, 2005 5:38 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
this is not possible in Hibernate.
TablePerClass should not be considered as a mainstream strategy unless you're mapping legacy systems.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 29, 2005 7:30 pm 
Senior
Senior

Joined: Tue Sep 13, 2005 2:01 am
Posts: 137
I have a class hierarchy that has 3 to 5 levels deep.
JOINED, or Table per class? which is better mapping strategy? which will perform better?

For JOINED, for every query, all related tables must be joined.

Thanks,
Dave


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