-->
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: HBM/Class Design Question
PostPosted: Fri Jul 25, 2008 9:33 am 
Newbie

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.


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.