Auto mappings and nested types.
It seems that automappings does not support nested classes (?)
I have class PrivateDiscussionTopic which is an aggregate root and it contains set of objects of type Message which is nested in PrivateDiscussionTopic. When I use this:
m.AutoMappings.Add(AutoMap.AssemblyOf().Where(t => t.IsSubclassOf(typeof(EntityBase))))
it tells me:
NHibernate.MappingException : An association from the table PrivateDiscussionTopic refers to an unmapped class: Athletics.Domain.Discussions.PrivateDiscussionTopic+Message.
(Message is subclass of EntityBase) How can I explicitly say I want that class to be included in mappings?
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by James Gregory on 16 May, 2010 05:43 PM
Nested types are completely unsupported with the automapper. You need to extract your class for it to be used with the automapper.
James Gregory resolved this discussion on 16 May, 2010 05:43 PM.