Joined: Fri Jul 25, 2008 8:43 am Posts: 2
|
Hello Everyone,
I'm considerably new to hibernate and was having an issue with how to model a certain layout of tables and entities.
This is the design of the database:
Table:
Id
Name
ItemType
ItemSubType
Group1
Group2
Group3
Group4
Now I was thinking of mapping concrete classes to represent items lets say:
Rows with: ItemType = 1 and ItemSubType = X are 1 class
Rows With: itemType = 2 and ItemSubType = P are another class
And so forth. I was wondering if it was a better option to split each item into separate tables to represent each class or could I model the class/hbm to represent this layout. Note that I don't need inheritance as they are supposed to be totally different in meaning to the application consuming these types.
If anyone can help me decide which would be a better approach I'd be greatly appreciated. Thanks in advance.
|
|