title: NHibernate Projections (QueryOver.SelectList) limits
body: <p>I'm new on stackoverflow and i hope this question will be appreciated.</p>
  
  <p>Simply said: I select everything from table x left outer join table y. Table x has way too many columns so i make new object x. This object is used for the Projection. I can project every single column of table x i want. But when i try to project/select an collection (the collection of table y) then i get the same error: 'Index was outside the bounds of the array'.</p>
  
  <p>My question: Does NHibernate support to select/project a collection at all? Because i've seen this question multiple times by searching on google (and stackoverflow), but none of those questions were answered.</p>
  
  <p>Code example:</p>
  
  <pre><code>public class X
  {
      public virtual int ID { get; set; }
      public virtual int IDontNeedMoreInfoAboutClassXItTakesToMuchTimeToRetrieve { get; set; }
      public virtual IList&lt;Y&gt; YCollection { get; set; }
  }
  
  public class Y
  {
      public virtual int YID { get; set; }
  }
  
  public class XRepository{
      public ISession Session {get; set;}
      public IList&lt;X&gt; Get()
      {
  
          X xAlias = null;
          Y yAlias = null;
          X resultAlias = null;
          return Session.QueryOver&lt;X&gt;()
              .JoinAlias(() =&gt; xAlias.YCollection, () =&gt; yAlias, JoinType.LeftOuterJoin)
              .SelectList(list =&gt; list
                  .SelectGroup(() =&gt; xAlias.ID).WithAlias(() =&gt; resultAlias.ID)
                  .SelectGroup(() =&gt; xAlias.YCollection).WithAlias(() =&gt; resultAlias.YCollection)) // Index was outside the bounds of the array
                  .TransformUsing(Transformers.AliasToBean&lt;X&gt;()).List&lt;X&gt;();
      }
  }
  </code></pre>