-->
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: Relationship table attributes mapped to entities
PostPosted: Tue Jun 02, 2009 2:51 pm 
Newbie

Joined: Tue Jun 02, 2009 2:39 pm
Posts: 1
Hi all,


I have the following question. How to configure the mapping when I have an atrribute in a many-to-many relationship table and this attribute belongs to an entity in my domain object? It means that the relationship table exist only on the database.

for example:

I have in the domain model:

- An Order entity with a collection of products (IList<Product>).
- Each Product in the collection has a flag IsForPresent indicating if the product must be sent wrapped for present.


And in the database:
ORDER (ORDER_ID, .... etc )
PRODUCT (PRODUCT_ID, PRODUCT_DESCRIPTION ... etc)
PRODUCT_ORDER (ORDER_ID, PRODUCT_ID, FLAG_WRAP_FOR_PRESENT).


The FLAG_WRAP_FOR_PRESENT's value should be mapped to the Product entity.

How can I achieve this?

Any help is 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.