FluentNhibernate IDictionary<Entity,ValueObject>
Posted
by Miguel Marques
on Stack Overflow
See other posts from Stack Overflow
or by Miguel Marques
Published on 2010-03-11T10:32:30Z
Indexed on
2010/03/18
3:41 UTC
Read the original article
Hit count: 666
fluent-nhibernate
|nhibernate
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
© Stack Overflow or respective owner