title: Association references unmapped class hibernate
body: <p>The configuration for Affiliate class is:  </p>
  
  <pre><code>&lt;class name="AffiliatesDO" table="AFFILIATES"&gt;
      &lt;id name="affiliateId" column="affiliate_id" type="java.lang.String"&gt;
          &lt;generator class="assigned" /&gt;
      &lt;/id&gt;
      &lt;property name="customerId" column="customer_id" type="int" /&gt;
      &lt;property name="affiliateType" column="affiliate_type" type="java.lang.String" /&gt;
      &lt;property name="site" column="site" type="java.lang.String" /&gt;
      &lt;property name="status" column="status" type="java.lang.String" /&gt;
      &lt;property name="createdBy" column="created_by" type="java.lang.String" /&gt;
      &lt;property name="creationDate" column="creation_date" type="java.util.Date" /&gt;
      &lt;property name="lastUpdatedBy" column="last_updated_by" type="java.lang.String" /&gt;
      &lt;property name="lastUpdated" column="last_updated" type="java.util.Date" /&gt;
        &lt;set name="address" lazy="true" inverse="true" order-by="address_id asc"&gt;
          &lt;key column="address_id"/&gt;
          &lt;one-to-many class="AddressDO"/&gt;
      &lt;/set&gt;
  &lt;/class&gt;
  </code></pre>
  
  <p>The Configuration for Address class is</p>
  
  <pre><code>&lt;class name="Address"
      table="Address"&gt;
      &lt;id name="addressId" column="address_id"
          type="java.lang.String"&gt;
          &lt;generator class="assigned" /&gt;
      &lt;/id&gt;
  
  
      &lt;property name="name" column="name" type="java.lang.String" /&gt;
  
      &lt;property name="address1" column="address1" type="java.lang.String" /&gt;
  
  
      &lt;property name="phone" column="phone" type="java.lang.String" /&gt;
  
      &lt;property name="landLineNumber" column="land_line_number" type="java.lang.String" /&gt;
  
      &lt;property name="faxNumber" column="fax_number" type="java.lang.String" /&gt;
  
  &lt;/class&gt;
  </code></pre>
  
  <p>I am getting the below error</p>
  
  <pre><code>org.hibernate.MappingException: Association references unmapped class: com.infibeam.customerservice.dbObjects.AddressDO
  at org.hibernate.cfg.HbmBinder.bindCollectionSecondPass(HbmBinder.java:2370)
  at org.hibernate.cfg.HbmBinder$CollectionSecondPass.secondPass(HbmBinder.java:2652)
  at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:43)
  at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1054)
  at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:296)
  at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1039)
  at org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfiguration.getConfiguration(AbstractComponentConfiguration.java:38)
  at org.codehaus.mojo.hibernate3.HibernateExporterMojo.configureExporter(HibernateExporterMojo.java:186)
  at org.codehaus.mojo.hibernate3.exporter.Hbm2JavaGeneratorMojo.configureExporter(Hbm2JavaGeneratorMojo.java:69)
  </code></pre>
  
  <p>Kindly show me the mistakes I have made.. I want to use one to many relation AffiliateDO->AddressDO</p>