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!
|