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: Table per class hierarchy and composite id problem
PostPosted: Sat May 29, 2004 8:30 am 
Newbie

Joined: Thu Feb 12, 2004 4:33 am
Posts: 7
Hi Forum,

I am using table per hierarchy mapping strategy. I have a situation where a single table stores various types of objects mapped to generic columns. The table has to have a composite key.

My base class would have:

A
B
C
attirbutes mapped to columns a,b,c in the database table.

Each derived class has extra attributes D,E,F mapped to the table columns
d,e,f.

Now my composite key comprises of a,b,c,d.

How should i map these objects to this single table?

Any other strategy that you could suggest?

I use B or column b as a descriminator?

Thanking in anticipation...


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 29, 2004 8:35 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
I'm not sure I understand what is hard about this. How about you show your attempt at a mapping, and let others suggest tweaks.


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.