Dear All ,
I am having the following error when using NHibernate:
Association references unmapped class.The mapping file on which I am getting the error is as follows:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="false">
  <class name="TP.CoE.Services.EmployeeInformationSystemEntities.JobPositionSetup,TP.CoE.Services.EmployeeInformationSystemEntities" table="JOB_POSITION_SETUP" >
    <id name="Id" column="JOB_POSITION_ID" type="System.Decimal" unsaved-value="null">
      <generator class="sequence">
        <param name="sequence">SEQ_JOB_POS_SETUP_ID</param>
      </generator>
    </id>
    <property name="Createddate" column="CREATED_DATE" access="field.pascalcase-underscore" not-null="false" type="System.DateTime"  insert="true" update="true"/>
    <property name="Updateddate" column="UPDATED_DATE" access="field.pascalcase-underscore" not-null="false" type="System.DateTime"  insert="true" update="true"/>
    <property name="Salary" column="SALARY" access="field.pascalcase-underscore" not-null="false" type="System.Double"  insert="true" update="true"/>
    <property name="Name" column="NAME" access="field.pascalcase-underscore" not-null="false" type="System.String"  insert="true" update="true"/>
    <many-to-one name="Reportingposition"  access="field.pascalcase-underscore" not-null="false" outer-join="auto" insert="true" update="true">
      <column name="REPORTING_POSITION_ID"/>
    </many-to-one>
    <many-to-one name="Createdby"  access="field.pascalcase-underscore" not-null="false" outer-join="auto" insert="true" update="true">
      <column name="CREATED_BY"/>
    </many-to-one>
    <many-to-one name="Updatedby"  access="field.pascalcase-underscore" not-null="false" outer-join="auto" insert="true" update="true">
      <column name="UPDATED_BY"/>
    </many-to-one>
    <many-to-one name="Jobgroupdesignation"  access="field.pascalcase-underscore" not-null="true" outer-join="auto" insert="true" update="true">
      <column name="JOB_GROUP_DESIGNATION_ID"/>
    </many-to-one>
    <many-to-one name="Orgstructurelastlevel"  access="field.pascalcase-underscore" not-null="false" outer-join="auto" insert="true" update="true">
      <column name="ORG_STRUCTURE_LAST_LEVEL_ID"/>
    </many-to-one>
    <many-to-one name="Office"  access="field.pascalcase-underscore" not-null="true" outer-join="auto" insert="true" update="true">
      <column name="OFFICE_ID"/>
    </many-to-one>
    <many-to-one name="Status"  access="field.pascalcase-underscore" not-null="true" outer-join="auto" insert="true" update="true">
      <column name="STATUS_ID"/>
    </many-to-one>
    <many-to-one name="Employmenttype"  access="field.pascalcase-underscore" not-null="true" outer-join="auto" insert="true" update="true">
      <column name="EMPLOYMENT_TYPE_ID"/>
    </many-to-one>
    <many-to-one name="Organization"  access="field.pascalcase-underscore"  not-null="true" outer-join="auto" insert="true" update="true">
      <column name="ORGANIZATION_ID"/>
    </many-to-one>
    <bag  name="FKJPREPORTINGPOSITIONID" cascade="none" inverse="true" lazy="true" access="field.pascalcase-underscore">
      <key>
        <column name="REPORTING_POSITION_ID"/>
      </key>
      <one-to-many class="TP.CoE.Services.EmployeeInformationSystemEntities.JobPositionSetup,TP.CoE.Services.EmployeeInformationSystemEntities"/>
    </bag >
    <bag  name="FKPOSINFOJOBPOSITIONID" cascade="none" inverse="true" lazy="true" access="field.pascalcase-underscore">
      <key>
        <column name="JOB_POSITION_ID"/>
      </key>
      <one-to-many class="TP.CoE.Services.EmployeeInformationSystemEntities.PositionInfo,TP.CoE.Services.EmployeeInformationSystemEntities"/>
    </bag >
    <bag  name="FKJHJOBPOSITIONID" cascade="none" inverse="true" lazy="true" access="field.pascalcase-underscore">
      <key>
        <column name="JOB_POSITION_ID"/>
      </key>
      <one-to-many class="TP.CoE.Services.EmployeeInformationSystemEntities.JobPositionHistory,TP.CoE.Services.EmployeeInformationSystemEntities"/>
    </bag >
    <bag  name="FKJHREPORTINGPOSITIONID" cascade="none" inverse="true" lazy="true" access="field.pascalcase-underscore">
      <key>
        <column name="REPORTING_POSITION_ID"/>
      </key>
      <one-to-many class="TP.CoE.Services.EmployeeInformationSystemEntities.JobPositionHistory,TP.CoE.Services.EmployeeInformationSystemEntities" />
    </bag >
   
  </class>
</hibernate-mapping>
I have checked the table there are many Foreign keys in it and all are mentioned in the mappings file , plus the Build action is also set to Embeded Resource , still I am not able to guess why this error is occurring ,any help would be really appreciated.
Regards,
Fahad.