-->
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.  [ 2 posts ] 
Author Message
 Post subject: Mapping of subclasses fields to the same table field
PostPosted: Thu Sep 06, 2007 10:34 am 
Newbie

Joined: Thu Sep 06, 2007 10:24 am
Posts: 2
Hi.

When i use "Table per class hierarchy" mapping strategy, can i map fields of different subclasses to the same table field?

For example.

Class Value { String value;}
Class name_one extends Value {int id_one;}
Class name_two extends Value {int id_two;}

table
-------
table_id
value
discriminator
id

So can i map both id_one and id_two to the id?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 06, 2007 12:03 pm 
Regular
Regular

Joined: Thu Oct 19, 2006 12:07 pm
Posts: 75
I don't see why not.
Go and try it.


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