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!
|