-->
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.  [ 1 post ] 
Author Message
 Post subject: Design Suggestions / Inheritance?
PostPosted: Wed Dec 10, 2008 6:07 am 
Beginner
Beginner

Joined: Wed Dec 10, 2008 5:59 am
Posts: 47
Hi,

I am new to Hibernate, but have managed to get it up and working for most of my needs. However, there's one thing i'd hope someone would be willing to throw suggestions at:

I have the classes Patronym, Pseudonym and Group which all extends the class Stakeholder.

1. A patronym (persons real name) has references to which groups it is a member of, and which pseudonyms (alias names) it appears with.

2. A pseudonym has a reference to its parent Patronym.

3. A group has references to it's members (<Patronym>)

4. The Stakeholder class has fields which are common for them all, such as their ID, name/title.

I have been trying with joined-subclass, discriminator columns, and the like...but, i'm having trouble getting it to work.

What i would like to achieve is to run a "query" for Stakeholders, and then have Hibernate to create the various Stakeholders (as Patronym, Pseudonym and Groups) and create the necessary references to each other.

Would anyone have a hint to wether i should be looking at table per subclass, table per class....or?

Any suggestions welcome!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.