NHibernate MappingException association references unmapped class

During the mapping process you may encounter this error.


In my situation the case was that I had the wrong namespace identified within the class attribute within a bag element containing a one-to-many element, like the below.

<bag name="Customer">
   <key column="CUST_ID" />
   <one-to-many class="CompanyName.SysName.Nhibernate.Common.Customer" />

Instead of Common I had another directory referenced. Once this was updated to the correct directory where the class (class.cs) file existed, the Session Factory was able to successfully validate all .hbm.xml files and load the configuration.