title: NHibernate: Criteria expression to retrieve non-null one-to-one associated class
body: <p>I have two classes that are associated with a one-to-one mapping:</p>
  
  <pre><code>&lt;class name="Employee" table="Employees"&gt;
    ...
    &lt;one-to-one name="Address" class="AddressInfo"&gt;
    ...
  &lt;/class&gt;
  </code></pre>
  
  <p>I would like to use a criteria expression to get only Employees where the the associated Address class is not null, something like this (which I know doesn't work):</p>
  
  <pre><code>IList employeesWithAddresses = sess.CreateCriteria(typeof(Employee))
      .Add( Expression.IsNotNull("Address") )
      .List();
  </code></pre>
  
  <p>I guess this is either a really difficult question or almost no one has tried to do this?</p>