title: NHibernate.MappingException Could not determine type for: Entity
body: <p>i have a asp.net aplication and add a library with my domains objects and xml files.</p>
  
  <p>the trace is:</p>
  
  <pre><code>Message=Could not determine type for: VaLibrary.Core.Domain.VAEmpresa, VaLibrary,    Version=1.0.5.18335, Culture=neutral, PublicKeyToken=null, for columns:    NHibernate.Mapping.Column(IdDev)
  </code></pre>
  
  <p>Source=NHibernate</p>
  
  <p>i search in the web same error, but, solutions are for other mapping options (fluent, castle, etc.) not for xml</p>
  
  <p>my Code class is here</p>
  
  <pre><code>using System;
     using System.Text;
     using System.Collections.Generic;
     namespace VaLibrary.Core.Domain {
  
      public class VAEmpresa {
          private int? _id;
          private string _nombre;
          private string _tipo;
          public VAEmpresa() {
              VAJu_Dev = new List&lt;VAJu&gt;();
              VAJu_Pub = new List&lt;VAJu&gt;();
          }
          public virtual int Id {
              get {
                  return (int)this._id;
              }
              set {
                  this._id = value;
              }
          }
          public virtual string Nombre {
              get {
                  return this._nombre;
              }
              set {
                  this._nombre = value;
              }
          }
          public virtual string Tipo {
              get {
                  return this._tipo;
              }
              set {
                  this._tipo = value;
              }
          }
          public virtual IList&lt;VAJu&gt; VAJu_Dev { get; set; }
          public virtual IList&lt;VAJu&gt; VAJu_Pub { get; set; }
      }
  }
  </code></pre>
  
  <p>and reference is:</p>
  
  <pre><code>using System;
  using System.Text;
  using System.Collections.Generic;
  namespace VaLibrary.Core.Domain {
  
      public class VAJu {
          private int? _id;
          private VAEmpresa _idDev;
          private VAEmpresa _idPub;
          private VACon _vACon;
          private string _titulo;
          private int _numerop;
          public VAJu() {
              VApllist = new List&lt;VApllist&gt;();
          }
          public virtual int Id {
              get {
                  return (int)this._id;
              }
              set {
                  this._id = value;
              }
          }
          public virtual VAEmpresa IdDev {
              get {
                  return this._idDev;
              }
              set {
                  this._idDev = value;
              }
          }
          public virtual VAEmpresa IdPub {
              get {
                  return this._idPub;
              }
              set {
                  this._idPub = value;
              }
          }
          public virtual VACon VACon {
              get {
                  return this._vACon;
              }
              set {
                  this._vACon = value;
              }
          }
          public virtual string Titulo {
              get {
                  return this._titulo;
              }
              set {
                  this._titulo = value;
              }
          }
          public virtual int Numerop {
              get {
                  return this._numerop;
              }
              set {
                  this._numerop = value;
              }
          }
          public virtual IList&lt;VApllist&gt; VApllist { get; set; }
      }
  }
  </code></pre>
  
  <p>the mappings files are:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;hibernate-mapping assembly="VaLibrary" namespace="VaLibrary.Core.Domain" xmlns="urn:nhibernate-mapping-2.2"&gt;
    &lt;class name="VAEmpresa" table="VA-Empresa" lazy="true" &gt;
      &lt;id name="Id" column="Id"&gt;
        &lt;generator class="identity" /&gt;
      &lt;/id&gt;
      &lt;property name="Nombre"&gt;
        &lt;column name="nombre" sql-type="varchar" not-null="true" /&gt;
      &lt;/property&gt;
      &lt;property name="Tipo"&gt;
        &lt;column name="tipo" sql-type="varchar" not-null="false" /&gt;
      &lt;/property&gt;
      &lt;bag name="VAJu_Dev" inverse="true" cascade="none"&gt;
        &lt;key column="IdDev" /&gt;
        &lt;one-to-many class="VaLibrary.Core.Domain.VAJu, VaLibrary" /&gt;
      &lt;/bag&gt;
      &lt;bag name="VAJu_Pub" inverse="true" cascade="none"&gt;
        &lt;key column="IdPub" /&gt;
        &lt;one-to-many class="VaLibrary.Core.Domain.VAJu, VaLibrary" /&gt;
      &lt;/bag&gt;
    &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;hibernate-mapping assembly="VaLibrary" namespace="VaLibrary.Core.Domain" xmlns="urn:nhibernate-mapping-2.2"&gt;
    &lt;class name="VAJu" table="VA-Ju" lazy="true" &gt;
      &lt;id name="Id" column="Id"&gt;
        &lt;generator class="identity" /&gt;
      &lt;/id&gt;
      &lt;property name="Titulo"&gt;
        &lt;column name="Titulo" sql-type="varchar" not-null="true" /&gt;
      &lt;/property&gt;
      &lt;many-to-one insert="false" update="false" lazy="false" name="IdDev"&gt;
        &lt;column name="IdDev" sql-type="int" not-null="true" /&gt;
      &lt;/many-to-one&gt;
      &lt;property name="IdDev"&gt;
        &lt;column name="IdDev" sql-type="int" not-null="true" /&gt;
      &lt;/property&gt;
      &lt;many-to-one insert="false" update="false" lazy="false" name="IdPub"&gt;
        &lt;column name="IdPub" sql-type="int" not-null="true" /&gt;
      &lt;/many-to-one&gt;
      &lt;property name="IdPub"&gt;
        &lt;column name="IdPub" sql-type="int" not-null="true" /&gt;
      &lt;/property&gt;  
      &lt;property name="Numerop"&gt;
        &lt;column name="numero-p" sql-type="int" not-null="true" /&gt;
      &lt;/property&gt;
      &lt;bag name="VApllist" inverse="true" cascade="none"&gt;
        &lt;key column="IdJu" /&gt;
        &lt;one-to-many class="VApllist" /&gt;
      &lt;/bag&gt;
    &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>the relantionship in DB is:
  Va-Ju.IdDev FK to VA-Empresa.Id PK
  Va-JU.IdPub FK to VA-Empresa.Id PK </p>
  
  <p>i try to change  for
   but is the same.</p>
  
  <p>I can do?</p>
  
  <p>thank you very much for your answers</p>
  
  <p>[Edit]</p>
  
  <p>i use Nhibernate 3.2</p>