Regular |
|
Joined: Tue Sep 09, 2003 9:37 pm Posts: 56 Location: Ogden, Utah, USA
|
It depends on how your data is modeled. If Books, lighters, sausages, etc. are all in one table (product) then you'd probably want a subclass. You would need a discriminator column in the table to tell hibernate which type of class to construct when loading them. The documentation has some examples of hibernate mappings.
If your items have a common database table, but additional information in a different table for each class then you should use a joined-subclass I think.
Good luck!
Jenica
|
|