[fluent-nhib] Re: Mapping sub classes

2009-03-11 Thread Martin Nilsson
Found it! DiscriminateSubClassesOnColumn("Type") .SubClass(m => m.Map(sc => sc.Name)); Note the changed column name "Name" -> "Type" On Wed, Mar 11, 2009 at 2:01 PM, Martin Nilsson wrote: > Same error if I remove map to superclass Name > > public void CreateMap() > { > Id(s => s

[fluent-nhib] Re: Mapping sub classes

2009-03-11 Thread Martin Nilsson
Same error if I remove map to superclass Name public void CreateMap() { Id(s => s.Id); //Map(x => x.Name); DiscriminateSubClassesOnColumn("Name") .SubClass(m => m.Map(sc => sc.Name)); } On Wed, Mar 11, 2009 at 1:48 PM, James Gregory wrote: > I don't think you should be m

[fluent-nhib] Re: Mapping sub classes

2009-03-11 Thread James Gregory
I don't think you should be mapping Name in the SuperClassTypeMap as well as in the subclasses. On Wed, Mar 11, 2009 at 12:44 PM, Martin Nilsson wrote: > I'm trying to map the state pattern to NH as this page tells me to do: > > http://www.lostechies.com/blogs/derickbailey/archive/2008/11/26/mapp