title: NHibernate throwing 'could not resolve property' exception
body: <p>I have the following Company with the attribute below (excluding Id):</p>
  
  <pre><code>    public virtual Category Category { get; set; }
  </code></pre>
  
  <p>That is mapped in a CompanyMap like this:</p>
  
  <pre><code>    HasOne(x =&gt; x.Category)
              .Cascade.All();
  </code></pre>
  
  <p>The Category has only the attribute:</p>
  
  <pre><code>    public virtual string Name { get; set; }
  </code></pre>
  
  <p>The CategoryMap:</p>
  
  <pre><code>    Map(x =&gt; x.Name)
              .Column("Name")
              .Length(40)
              .Unique();
  </code></pre>
  
  <p>The table is successfully created in the DB.</p>
  
  <p>I have a repository with the following queryover:</p>
  
  <pre><code>            var test = Session.QueryOver&lt;Company&gt;()
                                .WhereRestrictionOn(dbCompany =&gt; dbCompany.Category.Name)
                                .IsLike(category.Name);
  </code></pre>
  
  <p>category.name is just any string.</p>
  
  <p>Then I want to access the DB and get the results with:</p>
  
  <pre><code>    var result = test.List();
  </code></pre>
  
  <p>I get the following exception:</p>
  
  <pre><code>    could not resolve property: Category.Name of: My.Name.Space.Company
  </code></pre>
  
  <p>What is wrong with the query over?</p>