I'm trying to have a generic abstract base class to persist many inherited joined subclasses. I need this because a requirement is to keep centralized in one table (the info generic abstract) some informations.
Each subclass has a many-to-one relation to the T entity they manage. Everything works fine until I don't try to make GenericInfos generic :- ( I need this to force a default constructor in InfosEntity to get the T entity (the owner of the info). abstract class GenericInfos<T> where T : ISharedInfos //the generic abstract class InfosEntity: GenericInfos<Entity> //the joined subclass { Entity Owner; } class Entity : ISharedInfos //entity type { IList<InfosEntity> Infos; } This is the mapping for the classes. <class name="GenericInfos" abstract="true"> <joined-subclass name="InfosEntity" > <many-to-one name="Owner" class="Entity" /> </joined-subclass> </class> <class name="Entity"> <bag name="Infos"> <one-to-many class="InfosEntity" /> </bag> </class> This is the error I get. NHibernate.MappingException : Could not compile the mapping document: CommentsMapping.GenericInfos.hbm.xml ----> NHibernate.MappingException : persistent class InfosDomain.Model.GenericInfos, InfosDomain.Model not found Any help/ideas would be appreciated, thanks! -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com. To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.