title: org.hibernate.MappingException: Association references unmapped class
body: <p>The configuration for User class :</p>
  
  <pre><code>&lt;class name="User" table="users" lazy="false"&gt;
      &lt;id name="id" column="id"&gt;
          &lt;generator class="native"/&gt;
      &lt;/id&gt;        
      &lt;property name="type" column="type"/&gt;         
      &lt;many-to-one name="parent" column="parent"/&gt;
      &lt;property name="loginName" column="login_name" unique="true" not-null="true" index="idx_users_login_name" length="50"/&gt;
      &lt;property name="name" column="name" length="50"/&gt;
      &lt;property name="password" column="password"/&gt;
      &lt;property name="email" column="email" length="50"/&gt;
      &lt;property name="locale" column="locale" length="20"/&gt;
      &lt;property name="locked" column="locked"/&gt;
      &lt;many-to-one name="metadata" column="metadata_id"/&gt;
      &lt;set name="userSpaceRoles" cascade="all" inverse="true" lazy="false"&gt;
          &lt;key column="user_id"/&gt;
          &lt;one-to-many class="UserSpaceRole"/&gt;
      &lt;/set&gt;      
  &lt;/class&gt;
  </code></pre>
  
  <p>and for the class MeetingItem is:</p>
  
  <pre><code>&lt;class name="MeetingItem" table="meeting_item"&gt;
      &lt;id name="id" column="meeting_item_id" type="long"&gt;
          &lt;generator class="native"/&gt;
      &lt;/id&gt;
      &lt;property name="summary" column="summary" type="string"/&gt;
      &lt;property name="detail" column="detail" type="string"/&gt;
      &lt;many-to-one name="space" column="space_id"/&gt;
      &lt;property name="date" column="date" type="date"/&gt;
      &lt;list name="users" cascade="all" lazy="false"&gt;
          &lt;key column="meeting_item_id"/&gt;
          &lt;index column="idx"/&gt;
          &lt;one-to-many class="User"/&gt;
      &lt;/list&gt;
  &lt;/class&gt;
  </code></pre>
  
  <p>The problem is I am getting the exception:</p>
  
  <pre><code>org.hibernate.MappingException: Association references unmapped class: info.domain.User
  at org.hibernate.cfg.HbmBinder.bindCollectionSecondPass(HbmBinder.java:2380)
  at org.hibernate.cfg.HbmBinder.bindListSecondPass(HbmBinder.java:2231)
  at org.hibernate.cfg.HbmBinder$ListSecondPass.secondPass(HbmBinder.java:2729)
  at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:43)
  at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1130)
  at org.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:936)
  at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:140)
  </code></pre>
  
  <p>The mapping of the list is creating the problem. What I am doing wrong?</p>
  
  <hr>
  
  <p>Edit:</p>
  
  <p>This two configuration resides in different file, if these two are placed in same xml then the problem is not occurring.</p>