(Fluent)NHibernate: Mapping an IDictionary<MappedClass, MyEnum>
Posted
by anthony
on Stack Overflow
See other posts from Stack Overflow
or by anthony
Published on 2010-02-04T06:19:54Z
Indexed on
2010/03/27
22:03 UTC
Read the original article
Hit count: 665
I've found a number of posts about this but none seem to help me directly. Also there seems to be confusion about solutions working or not working during different stages of FluentNHibernate's development.
I have the following classes:
public class MappedClass
{
...
}
public enum MyEnum
{
One,
Two
}
public class Foo
{
...
public virtual IDictionary<MappedClass, MyEnum> Values { get; set; }
}
My questions are:
- Will I need a separate (third) table of MyEnum?
- How can I map the MyEnum type? Should I?
- What should Foo's mapping look like?
I've tried mapping HasMany(x => x.Values).AsMap("MappedClass")... This results in: NHibernate.MappingException : Association references unmapped class: MyEnum
© Stack Overflow or respective owner