title: NHibernate - CreateSQLQuery exception "No persister for ..", why?
body: <p>I'm trying to create a SQL query in NHibernate using CreateSQLQuery:</p>
  
  <pre><code>var query = session.CreateSQLQuery(
      "select loss.id as loss.Id, loss.start_date as loss.Date, " + 
      "       (select ... limit 1) as loss.Reserve, " +
      "       (select sum(m.val) ...) as loss.Payment " +
      "from LossData loss .. where ...";
  
  // Commenting or uncommenting these doesn't have any effect either
  query.AddScalar("Id", NHibernateUtil.Int32);
  query.AddScalar("Date", NHibernateUtil.DateTime);
  query.AddScalar("Reserve", NHibernateUtil.Double);
  query.AddScalar("Payment", NHibernateUtil.Double);
  
  query.AddEntity("loss", typeof(LossQueryDto));
  query.SetResultTransformer(Transformers.AliasToBean(typeof(LossQueryDto)));
  
  var list = query.List&lt;LossQueryDto&gt;();
  </code></pre>
  
  <p>But it gives me an error "No persister for: 'LossQueryDto'". What's wrong with this query ? 
  Do I need an additional mapping for the query ? If so, can I define one in Fluent Nhibernate ? I'm using NHibernate 3.1.</p>
  
  <p>The Dto itself is like this:</p>
  
  <pre><code>public class LossQueryDto
  {
      public virtual int Id { get; set; }
      public virtual DateTime Date { get; set; }
      public virtual double Reserve { get; set; }
      public virtual double Payment { get; set; }
  }
  </code></pre>
  
  <p>Thanks!</p>