title: NHibernate AliasToBean transformer associations
body: <p>I'm trying to use the following statement to get an entity with the fields I'm after:</p>
  
  <pre><code>retVal = session.CreateCriteria(typeof(MyEntity))
              .CreateAlias("MyEntityProperty", "MyEntityProperty")
              .Add(Restrictions.Eq("MyEntityProperty.Year", year))
              .SetProjection(
                  Projections.Distinct(
                      Projections.ProjectionList()
                          .Add(Projections.Property("Property1"), "Property1")
                          .Add(Projections.Property("Property2"), "Property2")
                          .Add(Projections.Property("MyEntityProperty.RegisteredUser"), "MyEntityProperty.RegisteredUser")
                          .Add(Projections.Property("MyEntityProperty.CompanyInfo"), "MyEntityProperty.CompanyInfo")
                                                  )
              )
              .SetResultTransformer(Transformers.AliasToBean(typeof(MyEntity)))
              .List&lt;MyEntity&gt;()
              .Cast&lt;BaseMyEntity&gt;();
  </code></pre>
  
  <p>MyEntity is the entity I want to return, and MyEntityProperty is a property of MyEntity that is another entity (of type MyEntityProperty).</p>
  
  <p>The error I get is <code>Could not find a setter for property 'MyEntityProperty.RegisteredUser' in class 'MyEntity'</code></p>
  
  <p>Is the AliasToBean transformer not able to handle sub entities? Or is there something more I need to do to make it work?</p>