title: NHibernate Duplicate class/entity mapping problem
body: <p>I've have started my foray into C#.NET and NHibernate and I'm finally stuck on an exception I can't seem to figure out, and Google isn't helping.</p>
  <p>I'm getting a &quot;NHibernate.DuplicateMappingException : Duplicate class/entity mapping&quot; on my <code>Parent</code> class.  Below is my mapping file for the <code>Parent</code> class, and the <code>Youth</code> class that uses the <code>Parent</code> class:</p>
  <pre class="lang-xml prettyprint-override"><code>    &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
      &lt;hibernate-mapping xmlns=&quot;urn:nhibernate-mapping-2.2&quot;
                         assembly=&quot;Surrix.Cerberus.YouthData&quot;
                         namespace=&quot;Surrix.Cerberus.YouthData.Domain&quot;&gt;
        &lt;class name=&quot;Parent&quot;&gt;
          &lt;id name=&quot;parentId&quot;&gt;
            &lt;generator class=&quot;guid&quot; /&gt;
          &lt;/id&gt;
          &lt;property name=&quot;firstName&quot; not-null=&quot;true&quot; /&gt;
          &lt;property name=&quot;lastName&quot; not-null=&quot;true&quot; /&gt;
          &lt;property name=&quot;homePhone&quot; /&gt;
          &lt;property name=&quot;parentEmail&quot; /&gt;
          &lt;property name=&quot;relationshipToYouth&quot; /&gt;
          
          &lt;!-- Address component that should map to the Address class --&gt;
          &lt;component name=&quot;parentAddress&quot;&gt;
            &lt;property name=&quot;street&quot; /&gt;
            &lt;property name=&quot;state&quot; /&gt;
            &lt;property name=&quot;zipCode&quot; /&gt;
            &lt;property name=&quot;city&quot; /&gt;
          &lt;/component&gt;
          
        &lt;/class&gt;
      
      &lt;/hibernate-mapping&gt;
  </code></pre>
  <p>And here is the relevant part of the <code>Youth</code> class (it is considerably bigger)</p>
  <pre class="lang-xml prettyprint-override"><code>    &lt;set name=&quot;YouthParents&quot; table=&quot;YouthParents&quot; cascade=&quot;none&quot;&gt;
        &lt;key column=&quot;youthId&quot; /&gt;
        &lt;many-to-many column=&quot;parentId&quot; class=&quot;Parent&quot;/&gt;
      &lt;/set&gt;
  </code></pre>
  <p>Only other thing is the <code>Youth</code> class also has the <code>firstName</code> and <code>lastName</code> properties, but I can't see that being a problem.</p>