title: How to join Two tables of two non relashinship defined columns using Nhibernate QueryOver
body: <p>Using NHibernate <code>QueryOver</code>, I want to join two tables using two columns which are not defined in the mapping as a relationship.</p>
  
  <p>E.g. This is not my exact scenario but this can explain that</p>
  
  <p>Tables:</p>
  
  <pre><code>Employee(Id, Name, DepartmentId, SomeCode,Address)
  
  Department (Id, Name, ,Code)
  </code></pre>
  
  <p>Select</p>
  
  <pre><code>SELECT * 
    FROM EMPLOYEE E 
    JOIN DEPARTMENT D 
      ON D.Code = E.SomeCode
  </code></pre>
  
  <p>Can someone please tell me how to do this query using NHibernate <code>QueryOver</code>. Note that "SomeCode" in <code>Employee</code> and "Code" in <code>Department</code> are not defined as a relationship. DepartmentId is the foreign key and I can join these using <code>JoinAlias</code> but I want it in a somewhat different way.</p>