I'm having difficulty ignoring a property on an class which inherits from a base class.
Mapper.CreateMap<FormViewModelBase, EntityBase>()
.Include<FormViewModel, Entity>()
.ForMember(x => x.Id, o => o.Ignore());
Mapper.CreateMap<FormViewModel, Entity>();
The only thing to note here is that the property on the base class is String and the property on the derived class is a Int32.
No matter what, when i try map an instance of FormViewModel to Entity the String based Id property on the Entity class is always set to the Int value from the FormViewModel, even though i have specified to ignore it.
The reason I am using different types for the Id on FormViewModel and Entity, is that I am using RavenDB in a web app and objects can be loaded via a string or an int Id. On the client-side Int Id's are preferred as the standard Raven string based ID's do not play well when generating links.
Can anyone tell me what the problem is here ?