-->
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: Using idbag with composite-element
PostPosted: Mon Sep 11, 2006 6:01 am 
Newbie

Joined: Mon Sep 11, 2006 5:43 am
Posts: 1
I have two tables that have many to many association between them. The tables are Product and Attribute. Many to many association is resolved using an associative table Product_Attribute. The table structure is as follows

Product
--------
Product_ID (PK)
Name

Attribute
----------
Attribute_ID (PK)
Name

Product_Attribute
--------------------
Product_Attribute_ID (PK)
Product_ID (FK)
Attribute_ID (FK)
Date
Value

The associative table uses a surrogate key but also introduces a new columns like Date and Value. If these extra columns would not have been present than I could have map this relationship using idbag. If the associative table would not have introduced the surrogate key than I could have mapp the relationship using composite-element. Is there any way i can use idbag with composite element (or any other solution) to map the above mentioned relationships.

_________________
Regards,
Khurram Rashid


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.