-->
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.  [ 2 posts ] 
Author Message
 Post subject: Mapping a denormalized table
PostPosted: Thu Sep 30, 2004 10:56 am 
Newbie

Joined: Thu Sep 30, 2004 10:31 am
Posts: 4
I've read the documentation, but I can't find any way to map a denormalized table. For example, suppose I have a CAT table that has several fields, but also has a relationship to a collection of multivalued attributes located in a CAT_ATTRIBUTE table. For example, the CAT_ATTRIBUTE table might contain the following data:

Code:
CAT_ID     CAT_ATTRIBUTE_ID    CAT_ATTRIBUTE_VALUE
------     ----------------    -------------------
SPARKY     COLOR               BROWN
SPARKY     COLOR               WHITE
SPARKY     EYE_COLOR           BLACK
SPARKY     FLUFFY              TRUE
JOE        COLOR               WHITE
JOE        EYE_COLOR           BLUE
JOE        EYE_COLOR           BROWN
JOE        FLUFFY              FALSE


In the object model, this would be represented as Cat has a collection of attributes, each of which has a collection of attribute values (Cat -> CatAttribute -> CatAttributeValue). The (admittedly not so great) database schema cannot be changed. Is this mapping possible using Hibernate?


Top
 Profile  
 
 Post subject: Mapping a denormalized table
PostPosted: Mon Mar 07, 2005 3:00 pm 
Newbie

Joined: Thu Sep 30, 2004 10:31 am
Posts: 4
I found that there was no way to do this in Hibernate2. Does Hibernate3 have support for this type of mapping?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.