FluentNhibernate IDictionary<Entity,ValueObject>
- by Miguel Marques
I had a mapping for a IDictionary<StocksLocation,decimal> property, this was the mapping:
HasMany<StocksLocation>(mq => mq.StocksLocation)
.KeyColumn("IDProduct")
.AsEntityMap("IDLocation")
.Element("Quantity", qt => qt.Type<decimal>());
Now i changed from decimal to a Value Object: Quantity.
Quantity has two properties, decimal Value and Unit Unit (where Unit is an enum).
I now have to map IDictionary<StocksLocation,Quantity>, how can i achieve this?
Thanks in advance