Hibernate version:
2.1
Name and version of the database you are using:
mysql 4.0.16
I have been using Tom Sedge's excellent documentation on Index of Relationships and have been having great success.
But now I stumble onto something I need a little guidance on. It seems to fall somewhere in the realm of subclass or joined subclass.
I have a baseclass (table) Activity and subclasses Biking and Surfing, for example. Activity has a primary key, a name, a and a location. The subclasses extend this information with database tables pertaining to their own activity types and would be keyed off the activity table's primary key.
The subclass mapping implies that each row of data can be mapped to a different sublcass based on a discriminator-value (if I'm reading it right). Which is a concept that I think I need to use as each activity row is potentially instantiated as a different activity object (Biking, Surfing, ...). But subclass doesn't join tables.
The joined subclass mapping doesn't seem to support each join being a potentially different subclass, but instead is always the same subclass.
Is there another way I should be approaching this or am I possibly misinterpreting subclass and joined subclass?
Thanks,
Jay Wright
|