title: nHibernate: Using entity-name with QueryOver and CreateCriteria
body: <p>I have two hbm.xml mappingfiles. They are identical except for the class table and class entity-name properties. They are supposed to populate the same Entity.
  They have entity-name= Alpha and Beta, table= PersonAlpha and PersonBeta respectively.</p>
  
  <p>I have tryed using both QueryOver and Criteria to populate the entity Person:</p>
  
  <pre><code>var person = session.QueryOver&lt;Person&gt;("Alpha").Where(p =&gt; p.Firstname == "Donald").SingleOrDefault&lt;Person&gt;();
  var person2 = session.CreateCriteria("Beta").Add(Restrictions.Eq("Firstname", "Donald")).UniqueResult&lt;Person&gt;();
  </code></pre>
  
  <p>As Im ref to the entity-name I thought nHibernate would know which mappingfile to use, but according to Profiler each of the above statements generete SQLs against both the PersonAlpha and PersonBeta tables. Why is this?</p>
  
  <p>Im using version 3.2.0 2001 og nHibernate.</p>
  
  <p>Thanks!</p>